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 0f0e04226e73a6c5b7700e0add64da3728463ddb
parent 65abb0ed34ae567de0e063a81417fd58954c98f8
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Mon, 29 Aug 2016 04:37:19 +0300

Mark more functions as inline

Diffstat:
Minclude/kfr/base/complex.hpp | 8++++----
Minclude/kfr/base/shuffle.hpp | 4++--
Minclude/kfr/cometa.hpp | 4++--
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/kfr/base/complex.hpp b/include/kfr/base/complex.hpp @@ -147,15 +147,15 @@ struct vec_op<complex<T>, N> : private vec_op<T, N * 2> constexpr static size_t w = N * 2; - constexpr static simd<scalar_type, w> mul(const simd<scalar_type, w>& x, - const simd<scalar_type, w>& y) noexcept + CMT_INLINE constexpr static simd<scalar_type, w> mul(const simd<scalar_type, w>& x, + const simd<scalar_type, w>& y) noexcept { const vec<scalar_type, w> xx = x; const vec<scalar_type, w> yy = y; return *subadd(xx * dupeven(yy), swap<2>(xx) * dupodd(yy)); } - constexpr static simd<scalar_type, w> div(const simd<scalar_type, w>& x, - const simd<scalar_type, w>& y) noexcept + CMT_INLINE constexpr static simd<scalar_type, w> div(const simd<scalar_type, w>& x, + const simd<scalar_type, w>& y) noexcept { const vec<scalar_type, w> xx = x; const vec<scalar_type, w> yy = y; diff --git a/include/kfr/base/shuffle.hpp b/include/kfr/base/shuffle.hpp @@ -557,12 +557,12 @@ namespace internal template <size_t start, size_t stride> struct generate_index { - constexpr size_t operator()(size_t index) const { return start + index * stride; } + CMT_INLINE constexpr size_t operator()(size_t index) const { return start + index * stride; } }; template <size_t start, size_t size, int on, int off> struct generate_onoff { - constexpr size_t operator()(size_t index) const + CMT_INLINE constexpr size_t operator()(size_t index) const { return index >= start && index < start + size ? on : off; } diff --git a/include/kfr/cometa.hpp b/include/kfr/cometa.hpp @@ -162,7 +162,7 @@ struct compound_type_traits template <typename U> using deep_rebind = U; - static constexpr const subtype& at(const T& value, size_t /*index*/) { return value; } + CMT_INLINE static constexpr const subtype& at(const T& value, size_t /*index*/) { return value; } }; template <typename T> @@ -195,7 +195,7 @@ struct compound_type_traits<std::pair<T, T>> template <typename U> using deep_rebind = std::pair<cometa::deep_rebind<subtype, U>, cometa::deep_rebind<subtype, U>>; - static constexpr const subtype& at(const std::pair<subtype, subtype>& value, size_t index) + CMT_INLINE static constexpr const subtype& at(const std::pair<subtype, subtype>& value, size_t index) { return index == 0 ? value.first : value.second; }