6#ifndef VIR_SIMD_RESIZE_H
7#define VIR_SIMD_RESIZE_H
14 template <
int N,
typename T,
typename A>
15 constexpr vir::detail::deduced_simd<T, N>
16 simd_resize(
const stdx::simd<T, A>& x)
18 constexpr int xn = stdx::simd_size_v<T, A>;
19 return vir::detail::deduced_simd<T, N>([&x](
auto i) {
27 template <
int N,
typename T,
typename A>
28 constexpr vir::detail::deduced_simd_mask<T, N>
29 simd_resize(
const stdx::simd_mask<T, A>& x)
31 constexpr int xn = stdx::simd_size_v<T, A>;
32 return vir::detail::deduced_simd_mask<T, N>([&x](
auto i) {
40 template <
typename V,
typename A>
41 constexpr std::enable_if_t<stdx::is_simd_v<V>, V>
42 simd_size_cast(
const stdx::simd<typename V::value_type, A>& x)
44 using T =
typename V::value_type;
45 constexpr int xn = stdx::simd_size_v<T, A>;
46 return V([&x](
auto i) {
54 template <
typename M,
typename A>
55 constexpr std::enable_if_t<stdx::is_simd_mask_v<M>, M>
56 simd_size_cast(
const stdx::simd_mask<typename M::simd_type::value_type, A>& x)
58#if VIR_GLIBCXX_STDX_SIMD
59 return std::experimental::parallelism_v2::__proposed::resizing_simd_cast<M>(x);
61 using T =
typename M::simd_type::value_type;
62 constexpr int xn = stdx::simd_size_v<T, A>;
63 return M([&x](
auto i) {
This namespace collects libraries and tools authored by Matthias Kretz.
Definition constexpr_wrapper.h:21