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 70da7e0ab909a61e5332caab21ed9f60b55f0f92
parent c4afb0356a3abc49f50be365b470a4dd135e45f9
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Thu,  8 Sep 2016 16:46:13 +0300

Remove deprecated ioratio

Diffstat:
Minclude/kfr/base/expression.hpp | 8+-------
Minclude/kfr/base/types.hpp | 25-------------------------
2 files changed, 1 insertion(+), 32 deletions(-)

diff --git a/include/kfr/base/expression.hpp b/include/kfr/base/expression.hpp @@ -123,11 +123,7 @@ private: template <typename Fn, typename T, size_t N, size_t... indices> CMT_INLINE vec<T, N> call_impl(Fn&& fn, csizes_t<indices...>, size_t index, vec_t<T, N>) const { - using ratio = func_ratio<Fn>; - constexpr size_t Nin = N * ratio::input / ratio::output; - - return fn(std::get<indices>(this->args)(cinput, index * ratio::input / ratio::output, - vec_t_for<Args, Nin>())...); + return fn(std::get<indices>(this->args)(cinput, index, vec_t_for<Args, N>())...); } template <size_t... indices> CMT_INLINE void begin_block_impl(size_t size, csizes_t<indices...>) @@ -177,8 +173,6 @@ using arg = internal::arg_impl<T>; template <typename Fn, typename... Args> struct expression_function : expression<arg<Args>...> { - using ratio = func_ratio<Fn>; - using value_type = subtype<decltype(std::declval<Fn>()(std::declval<vec<value_type_of<arg<Args>>, 1>>()...))>; using T = value_type; diff --git a/include/kfr/base/types.hpp b/include/kfr/base/types.hpp @@ -64,7 +64,6 @@ #define KFR_FNR(fn, in, out) \ struct fn_##fn \ { \ - using ratio = ioratio<in, out>; \ template <typename... Args> \ CMT_INLINE_MEMBER decltype(fn(std::declval<Args>()...)) operator()(Args&&... args) const \ { \ @@ -147,13 +146,6 @@ struct range T1 distance() const { return max - min; } }; -template <size_t in, size_t out> -struct ioratio -{ - constexpr static size_t input = in; - constexpr static size_t output = out; -}; - /// @brief An enumeration representing data type enum class datatype : int { @@ -251,23 +243,6 @@ using cinput_t = coutputinput_t<outputinput_t::input>; constexpr coutput_t coutput{}; constexpr cinput_t cinput{}; -namespace internal -{ -template <typename Fn, typename enable = void_t<>> -struct func_ratio_impl -{ - using type = ioratio<1, 1>; -}; -template <typename Fn> -struct func_ratio_impl<Fn, void_t<typename Fn::ratio>> -{ - using type = typename Fn::ratio; -}; -} - -template <typename Fn> -using func_ratio = typename internal::func_ratio_impl<remove_reference<Fn>>::type; - template <typename T> constexpr inline T align_down(T x, identity<T> alignment) {