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 ce1d8ea2af7b99b93216e7a730adbba424f830cb
parent c9edbe9d27d94e6def11efde4cc5c54bb7e45ff4
Author: [email protected] <[email protected]>
Date:   Wed, 27 Jul 2016 21:01:25 +0300

Revert "Better type deduction for expressions"

This reverts commit 9e6adbcdd27af4c2fd290fedbaf0313c7515c0ed.

Diffstat:
Minclude/kfr/base/expression.hpp | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/kfr/base/expression.hpp b/include/kfr/base/expression.hpp @@ -110,7 +110,7 @@ private: { using ratio = func_ratio<Fn>; constexpr size_t Nin = N * ratio::input / ratio::output; - using Tout = conditional<is_same<generic, value_type>::value, T, common_type<T, value_type>>; + using Tout = conditional<is_same<generic, value_type>::value, T, value_type>; return cast<T>(fn(cast<Tout>(std::get<indices>(this->args)( cinput, index * ratio::input / ratio::output, vec_t_for<Args, Nin, Tout>()))...)); @@ -162,7 +162,7 @@ struct generic_result template <typename Fn, typename... Args> struct generic_result<Fn, ctypes_t<Args...>, void_t<enable_if<!or_t<is_same<generic, Args>...>::value>>> { - using type = decltype(std::declval<Fn>()(std::declval<Args>()...)); + using type = subtype<decltype(std::declval<Fn>()(std::declval<vec<decay<Args>, 1>>()...))>; }; template <typename Fn, typename... Args> @@ -266,7 +266,7 @@ struct expressoin_typed : input_expression expressoin_typed(E1&& e1) : e1(std::forward<E1>(e1)) {} template <typename U, size_t N> - KFR_INLINE vec<U, N> operator()(cinput_t, size_t index, vec_t<U, N>) const + KFR_INLINE vec<U, N> operator()(cinput_t, size_t index, vec_t<U, N>) { return cast<U>(e1(cinput, index, vec_t<T, N>())); }