commit f21085c04a169c615ca088fb920e1d97046290d6
parent 62ddb7bce6890d3569fad2ff927b264dafc9050d
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Fri, 15 Sep 2023 13:24:03 +0100
Use special_constants for allones etc
Diffstat:
3 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/include/kfr/simd/comparison.hpp b/include/kfr/simd/comparison.hpp
@@ -92,7 +92,7 @@ KFR_INTRINSIC mask<T, N> isfinite(const vec<T, N>& x)
template <typename T, size_t N>
KFR_INTRINSIC mask<T, N> isnegative(const vec<T, N>& x)
{
- return (x & constants<T>::highbitmask()) != 0;
+ return (x & special_constants<T>::highbitmask()) != 0;
}
template <typename T, size_t N>
diff --git a/include/kfr/simd/operators.hpp b/include/kfr/simd/operators.hpp
@@ -215,7 +215,7 @@ KFR_INTRINSIC std::common_type_t<T1, T2> bitwiseand(const T1& x, const T2& y)
template <typename T>
constexpr KFR_INTRINSIC T bitwiseand(initialvalue<T>)
{
- return constants<T>::allones();
+ return special_constants<T>::allones();
}
KFR_FN(bitwiseand)
@@ -228,7 +228,7 @@ KFR_INTRINSIC std::common_type_t<T1, T2> bitwiseandnot(const T1& x, const T2& y)
template <typename T>
constexpr inline T bitwiseandnot(initialvalue<T>)
{
- return constants<T>::allones();
+ return special_constants<T>::allones();
}
KFR_FN(bitwiseandnot)
diff --git a/include/kfr/simd/read_write.hpp b/include/kfr/simd/read_write.hpp
@@ -193,38 +193,38 @@ KFR_INTRINSIC vec<T, N> to_vec(const std::array<T, N>& a)
}
template <typename T>
-constexpr T partial_masks[] = { constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
- constants<T>::allones(),
+constexpr T partial_masks[] = { special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
+ special_constants<T>::allones(),
T(),
T(),
T(),