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 a95b2c8137565f3ce3923ff6de4c415f51f0f3a1
parent e436cfdfb2df85f68f25a4127d1fd90af2d68368
Author: [email protected] <[email protected]>
Date:   Tue,  8 Nov 2016 06:38:11 +0300

Remove internal::arg

Diffstat:
Minclude/kfr/base/basic_expressions.hpp | 4++--
Minclude/kfr/dsp/biquad.hpp | 17++++++++---------
Minclude/kfr/dsp/dcremove.hpp | 4++--
Minclude/kfr/dsp/mixdown.hpp | 5++---
4 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/include/kfr/base/basic_expressions.hpp b/include/kfr/base/basic_expressions.hpp @@ -538,9 +538,9 @@ private: } template <typename... E, KFR_ENABLE_IF(is_output_expressions<E...>::value)> -internal::expression_unpack<internal::arg<E>...> unpack(E&&... e) +internal::expression_unpack<E...> unpack(E&&... e) { - return internal::expression_unpack<internal::arg<E>...>(std::forward<E>(e)...); + return internal::expression_unpack<E...>(std::forward<E>(e)...); } template <typename... E, KFR_ENABLE_IF(is_input_expressions<E...>::value)> diff --git a/include/kfr/dsp/biquad.hpp b/include/kfr/dsp/biquad.hpp @@ -260,10 +260,10 @@ struct expression_biquads_zl : expression<E1> * @param e1 Input expression */ template <typename T, typename E1> -CMT_INLINE internal::expression_biquads<1, T, internal::arg<E1>> biquad(const biquad_params<T>& bq, E1&& e1) +CMT_INLINE internal::expression_biquads<1, T, E1> biquad(const biquad_params<T>& bq, E1&& e1) { const biquad_params<T> bqs[1] = { bq }; - return internal::expression_biquads<1, T, internal::arg<E1>>(bqs, std::forward<E1>(e1)); + return internal::expression_biquads<1, T, E1>(bqs, std::forward<E1>(e1)); } /** @@ -273,10 +273,9 @@ CMT_INLINE internal::expression_biquads<1, T, internal::arg<E1>> biquad(const bi * @note This implementation introduces delay of N - 1 samples, where N is the filter count. */ template <size_t filters, typename T, typename E1> -CMT_INLINE internal::expression_biquads<filters, T, internal::arg<E1>> biquad( - const biquad_params<T> (&bq)[filters], E1&& e1) +CMT_INLINE internal::expression_biquads<filters, T, E1> biquad(const biquad_params<T> (&bq)[filters], E1&& e1) { - return internal::expression_biquads<filters, T, internal::arg<E1>>(bq, std::forward<E1>(e1)); + return internal::expression_biquads<filters, T, E1>(bq, std::forward<E1>(e1)); } /** @@ -286,10 +285,10 @@ CMT_INLINE internal::expression_biquads<filters, T, internal::arg<E1>> biquad( * @note This implementation has zero latency */ template <size_t filters, typename T, typename E1> -CMT_INLINE internal::expression_biquads_zl<filters, T, internal::arg<E1>> biquad_zl( - const biquad_params<T> (&bq)[filters], E1&& e1) +CMT_INLINE internal::expression_biquads_zl<filters, T, E1> biquad_zl(const biquad_params<T> (&bq)[filters], + E1&& e1) { - return internal::expression_biquads_zl<filters, T, internal::arg<E1>>(bq, std::forward<E1>(e1)); + return internal::expression_biquads_zl<filters, T, E1>(bq, std::forward<E1>(e1)); } /** @@ -304,7 +303,7 @@ CMT_INLINE expression_pointer<T> biquad_zl(const biquad_params<T>* bq, size_t co return cswitch(csizes_t<1, 2, 4, 8, 16, 32, 64>(), next_poweroftwo(count), [&](auto x) { constexpr size_t filters = x; - return to_pointer(internal::expression_biquads_zl<filters, T, internal::arg<E1>>( + return to_pointer(internal::expression_biquads_zl<filters, T, E1>( internal::biquad_block<T, filters>(bq, count), std::forward<E1>(e1))); }, [&] { return to_pointer(zeros<T>()); }); diff --git a/include/kfr/dsp/dcremove.hpp b/include/kfr/dsp/dcremove.hpp @@ -32,9 +32,9 @@ namespace kfr { template <typename E1, typename T = flt_type<value_type_of<E1>>> -CMT_INLINE internal::expression_biquads<1, T, internal::arg<E1>> dcremove(E1&& e1, double cutoff = 0.00025) +CMT_INLINE internal::expression_biquads<1, T, E1> dcremove(E1&& e1, double cutoff = 0.00025) { const biquad_params<T> bqs[1] = { biquad_highpass(cutoff, 0.5) }; - return internal::expression_biquads<1, T, internal::arg<E1>>(bqs, std::forward<E1>(e1)); + return internal::expression_biquads<1, T, E1>(bqs, std::forward<E1>(e1)); } } diff --git a/include/kfr/dsp/mixdown.hpp b/include/kfr/dsp/mixdown.hpp @@ -71,9 +71,8 @@ CMT_GNU_CONSTEXPR f64x2x2 matrix_halfsum_halfdiff() * @brief Returns template expression that returns the vector of length 2 containing mix of the left and right * channels */ -template <typename Left, typename Right, - typename Result = internal::expression_function< - internal::stereo_matrix, internal::expression_pack<internal::arg<Left>, internal::arg<Right>>>> +template <typename Left, typename Right, typename Result = internal::expression_function< + internal::stereo_matrix, internal::expression_pack<Left, Right>>> Result mixdown_stereo(Left&& left, Right&& right, const f64x2x2& matrix) { return Result(internal::stereo_matrix{ matrix },