Skip to content
Snippets Groups Projects
Unverified Commit 917dd124 authored by Nora Abi Akar's avatar Nora Abi Akar Committed by GitHub
Browse files

Expose `assign` from `sve.hpp` (#1477)

* Move `assign` out of the `detail` namespace in the SVE SIMD implementation code.
parent eeb01bca
No related branches found
No related tags found
No related merge requests found
...@@ -800,10 +800,12 @@ void compound_indexed_add( ...@@ -800,10 +800,12 @@ void compound_indexed_add(
} }
} }
[[maybe_unused]]
static int width(const svfloat64_t& v) { static int width(const svfloat64_t& v) {
return svlen_f64(v); return svlen_f64(v);
}; };
[[maybe_unused]]
static int width(const svint64_t& v) { static int width(const svint64_t& v) {
return svlen_s64(v); return svlen_s64(v);
}; };
...@@ -890,13 +892,13 @@ struct simd_cast_impl { ...@@ -890,13 +892,13 @@ struct simd_cast_impl {
return r; return r;
} }
}; };
} // namespace detail
template <typename T, typename Other> 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); a = detail::simd_cast_impl<T>::cast(b);
} }
} // namespace detail
} // namespace simd } // namespace simd
} // namespace arb } // namespace arb
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment