From 917dd1247625b0f19ce7cd18305176b0b823e27f Mon Sep 17 00:00:00 2001 From: Nora Abi Akar <nora.abiakar@gmail.com> Date: Wed, 14 Apr 2021 10:20:42 +0200 Subject: [PATCH] Expose `assign` from `sve.hpp` (#1477) * Move `assign` out of the `detail` namespace in the SVE SIMD implementation code. --- arbor/include/arbor/simd/sve.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arbor/include/arbor/simd/sve.hpp b/arbor/include/arbor/simd/sve.hpp index 6d2bd34b..c9f9cd70 100644 --- a/arbor/include/arbor/simd/sve.hpp +++ b/arbor/include/arbor/simd/sve.hpp @@ -800,10 +800,12 @@ void compound_indexed_add( } } +[[maybe_unused]] static int width(const svfloat64_t& v) { return svlen_f64(v); }; +[[maybe_unused]] static int width(const svint64_t& v) { return svlen_s64(v); }; @@ -890,13 +892,13 @@ struct simd_cast_impl { return r; } }; +} // namespace detail template <typename T, typename Other> -void assign(T& a, const Other& b) { +void assign(T& a, const Other& b, typename std::enable_if_t<detail::is_sve<T>::value>* = 0) { a = detail::simd_cast_impl<T>::cast(b); } -} // namespace detail } // namespace simd } // namespace arb -- GitLab