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 bb0bb6dfe3b745ea41c0619865ce3a007d2bb9ad
parent 3e6daf2fc5363a8c84bffb91a7934cf859b6b055
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date:   Wed, 11 Oct 2023 14:13:11 +0100

Fix vec<bit<>> for GCC

Diffstat:
Minclude/kfr/simd/vec.hpp | 18++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/include/kfr/simd/vec.hpp b/include/kfr/simd/vec.hpp @@ -334,14 +334,14 @@ struct alignas(internal::vec_alignment<T, N_>) vec // from mask of the same type template <typename U = T, KFR_ENABLE_IF(!is_bit<U> && compound_type_traits<T>::is_scalar)> - KFR_MEM_INTRINSIC explicit vec(const vec<bit<T>, N>& x) CMT_NOEXCEPT + KFR_MEM_INTRINSIC explicit vec( + const vec<std::conditional_t<compound_type_traits<T>::is_scalar, bit<T>, T>, N>& x) CMT_NOEXCEPT : v(x.v) { } // from vec to mask of the same type - template <typename U = T, KFR_ENABLE_IF(is_bit<U> && compound_type_traits<T>::is_scalar)> - KFR_MEM_INTRINSIC explicit vec(const vec<unwrap_bit<T>, N>& x) CMT_NOEXCEPT - : v(x.v) + template <typename U = T, KFR_ENABLE_IF(is_bit<U>&& compound_type_traits<T>::is_scalar)> + KFR_MEM_INTRINSIC explicit vec(const vec<unwrap_bit<T>, N>& x) CMT_NOEXCEPT : v(x.v) { } @@ -507,14 +507,8 @@ struct alignas(internal::vec_alignment<T, N_>) vec { return v.get(this->index)[index]; } - KFR_MEM_INTRINSIC value_type operator+() CMT_NOEXCEPT - { - return v.get(index); - } - KFR_MEM_INTRINSIC value_type operator-() CMT_NOEXCEPT - { - return -v.get(index); - } + KFR_MEM_INTRINSIC value_type operator+() CMT_NOEXCEPT { return v.get(index); } + KFR_MEM_INTRINSIC value_type operator-() CMT_NOEXCEPT { return -v.get(index); } KFR_MEM_INTRINSIC element& operator=(const value_type& s) CMT_NOEXCEPT {