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 e3903215063c7458c461da1091d4e870ca10a423
parent 46862e9de2ede937bf69e195c3f5a949823117c7
Author: [email protected] <[email protected]>
Date:   Mon, 25 Nov 2019 06:48:52 +0000

Use result_of

Diffstat:
Minclude/kfr/cometa.hpp | 2+-
Minclude/kfr/dft/dft_c.h | 8+++++++-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/kfr/cometa.hpp b/include/kfr/cometa.hpp @@ -115,7 +115,7 @@ template <typename... T> using common_type = typename std::common_type<T...>::type; template <typename T, typename... Args> -using invoke_result = typename std::invoke_result<T, Args...>::type; +using invoke_result = typename std::result_of<T(Args...)>::type; template <bool Condition, typename Type = void> using enable_if = typename std::enable_if<Condition, Type>::type; diff --git a/include/kfr/dft/dft_c.h b/include/kfr/dft/dft_c.h @@ -28,12 +28,18 @@ #include <stddef.h> #include <stdint.h> +#if defined(_M_IX86) || defined(__i386__) || defined(_M_X64) || defined(__x86_64__) +#define KFR_ARCH_IS_X86 1 +#elif defined(__arm__) || defined(__arm64__) || defined(_M_ARM) || defined(__aarch64__) +#define KFR_ARCH_IS_ARM 1 +#endif + #if defined(_M_X64) || defined(__x86_64__) #define KFR_CDECL #else #ifdef _WIN32 #define KFR_CDECL __cdecl -#else +#elif defined KFR_ARCH_IS_X86 #define KFR_CDECL __attribute__((__cdecl__)) #endif #endif