kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
Log | Files | Refs | README

commit 62a04de5537759f4a7323609e0541dd5649f4dde
parent ece6b29cd94d43babd6faed513fb72a9a0a7b6ef
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Wed, 31 Aug 2022 17:09:21 +0100

CMT_COMPILER_IS_MSVC

Diffstat:
Minclude/kfr/base/tensor.hpp | 2+-
Minclude/kfr/cident.h | 10++++++++--
Minclude/kfr/simd/platform.hpp | 2+-
Mtests/dsp_test.cpp | 2+-
4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/include/kfr/base/tensor.hpp b/include/kfr/base/tensor.hpp @@ -262,7 +262,7 @@ public: tensor(const tensor&) = default; tensor(tensor&&) = default; -#if defined(CMT_COMPILER_MSVC) && !defined(CMT_COMPILER_CLANG) +#if defined(CMT_COMPILER_IS_MSVC) tensor& operator=(const tensor& src) & { this->~tensor(); diff --git a/include/kfr/cident.h b/include/kfr/cident.h @@ -306,6 +306,7 @@ extern char* gets(char* __s); #define CMT_COMPILER_MSVC 1 #define CMT_MSVC_ATTRIBUTES 1 #define CMT_MSC_VER _MSC_VER +#define CMT_COMPILER_IS_MSVC 1 #else #define CMT_MSC_VER 0 #endif @@ -343,6 +344,12 @@ extern char* gets(char* __s); #endif #endif +#if defined(CMT_COMPILER_INTEL) || defined(CMT_COMPILER_CLANG) +#ifdef CMT_COMPILER_IS_MSVC +#undef CMT_COMPILER_IS_MSVC +#endif +#endif + #if defined(CMT_GNU_ATTRIBUTES) #define CMT_NODEBUG @@ -806,4 +813,4 @@ extern char* gets(char* __s); { \ __VA_ARGS__ \ } -#endif -\ No newline at end of file +#endif diff --git a/include/kfr/simd/platform.hpp b/include/kfr/simd/platform.hpp @@ -271,7 +271,7 @@ constexpr static size_t minimum_vector_width = template <typename T> constexpr static size_t vector_capacity = platform<>::simd_register_count* vector_width<T>; -#ifdef CMT_COMPILER_MSVC +#ifdef CMT_COMPILER_IS_MSVC template <typename T> constexpr static size_t maximum_vector_size = const_min(static_cast<size_t>(32), vector_width<T> * 2); #else diff --git a/tests/dsp_test.cpp b/tests/dsp_test.cpp @@ -339,7 +339,7 @@ TEST(phasor) TEST(fir) { -#ifdef CMT_COMPILER_MSVC +#ifdef CMT_COMPILER_IS_MSVC // testo::matrix causes error in MSVC { using T = float;