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 623e5f75423c97c5476f42e3cb7d85962433d665
parent 36d861a702eaf2701a2b790075e1d88f6259886f
Author: [email protected] <[email protected]>
Date:   Thu,  8 Sep 2016 20:36:08 +0300

Add KFR_ENABLE_IF for mix/mixs overloads

Diffstat:
Minclude/kfr/base/operators.hpp | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kfr/base/operators.hpp b/include/kfr/base/operators.hpp @@ -439,14 +439,14 @@ KFR_FN(fmsub) /// @brief Linear blend of `x` and `y` (`c` must be in the range 0...+1) /// Returns `x + ( y - x ) * c` -template <typename T1, typename T2, typename T3> +template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)> KFR_INTRIN constexpr common_type<T1, T2, T3> mix(T1 c, T2 x, T3 y) { return fmadd(c, y - x, x); } /// @brief Linear blend of `x` and `y` (`c` must be in the range -1...+1) -template <typename T1, typename T2, typename T3> +template <typename T1, typename T2, typename T3, KFR_ENABLE_IF(is_numeric_args<T1, T2, T3>::value)> KFR_INTRIN constexpr common_type<T1, T2, T3> mixs(T1 c, T2 x, T3 y) { return mix(fmadd(c, 0.5, 0.5), x, y);