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 282cffa0cc7b16e2a4e940bd5e1b3bd5ba046aeb
parent 4f113b3f6d57a74e78f3ce80061bd8f3a11b3797
Author: [email protected] <[email protected]>
Date:   Mon, 17 Oct 2016 07:34:41 +0300

Fix asymmetric FIR filter and define value_type

Diffstat:
Minclude/kfr/dsp/fir.hpp | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/kfr/dsp/fir.hpp b/include/kfr/dsp/fir.hpp @@ -74,9 +74,12 @@ struct expression_short_fir : expression<E1> template <typename T, typename E1, KFR_ARCH_DEP> struct expression_fir : expression<E1> { + using value_type = T; expression_fir(E1&& e1, const array_ref<const T>& taps) - : expression<E1>(std::forward<E1>(e1)), taps(taps), delayline(taps.size(), T()), delayline_cursor(0) + : expression<E1>(std::forward<E1>(e1)), taps(taps.size()), delayline(taps.size(), T(0)), + delayline_cursor(0) { + this->taps = reverse(make_univector(taps.data(), taps.size())); } template <size_t N> CMT_INLINE vec<T, N> operator()(cinput_t cinput, size_t index, vec_t<T, N> x) const