Named permutations and related element-manipulation operations for vectors and masks.
More...
|
| template<int _Np> |
| constexpr auto | xvec::simd::take (const vec_or_mask_type auto &in) |
|
template<int _Np> |
| constexpr auto | xvec::simd::drop (const vec_or_mask_type auto &in) |
| | Discard the first _Np elements of the input, returning the remainder.
|
|
template<int _Np> |
| constexpr auto | xvec::simd::grow (const vec_or_mask_type auto &in) |
| | Grow the vec or mask input to be N elements.
|
|
template<int _Np, vec_or_mask_type _Sp> |
| constexpr auto | xvec::simd::grow (const _Sp &in, const typename _Sp::value_type &fill) |
| | Grow the vec or mask input to be N elements, padding with the supplied value.
|
|
template<int _Np> |
| constexpr auto | xvec::simd::repeat_all (const vec_or_mask_type auto &in) |
| | Repeat the entire input value N times. The input [a b c] repeated 3 times would be [a b c a b c a b c].
|
|
template<int _Np> |
| constexpr auto | xvec::simd::repeat_each (const vec_or_mask_type auto &in) |
| | Repeat each value in the vec or mask N times. The input [a b c] repeated 2 times would be [a a b b c c].
|
|
constexpr auto | xvec::simd::reverse (const vec_or_mask_type auto &in) |
| | Reverse the order of the elements in the input vec or mask.
|
| template<int _Np, vec_or_mask_type _V> |
| constexpr auto | xvec::simd::stride (const _V &in) |
| template<int _Middle> |
| constexpr auto | xvec::simd::rotate (const vec_or_mask_type auto &in) |
| template<vec_or_mask_type... _Sps> |
| constexpr auto | xvec::simd::zip (const _Sps &...simds) |
| template<int N> |
| constexpr auto | xvec::simd::unzip (const vec_or_mask_type auto &in) |
|
template<int _Rows, int _Cols> |
| constexpr auto | xvec::simd::transpose (const vec_or_mask_type auto &in) |
| | Treat the vec or mask as a matrix of size [ROWS, COLS] and transpose the data into a matrix of size[COLS, ROWS].
|
|
template<vec_or_mask_type _V> |
| constexpr auto | xvec::simd::set_element (const _V &v, int index, typename _V::value_type element) |
| | Insert a scalar element into the given index position of the supplied vec_or_mask_type object.
|
|
template<int _Begin, int _End, vec_or_mask_type _Vp> |
| constexpr resize_t< _End - _Begin, _Vp > | xvec::simd::extract (const _Vp &v) |
| | Extract the subset denoted by the range [begin..end) from the supplied vec or mask.
|
template<simd_size_type _Begin, vec_or_mask_type _Parent, vec_or_mask_type _Child>
requires (vec_or_mask_same_element_type<_Parent, _Child>) |
| constexpr _Parent | xvec::simd::insert (const _Parent &parent, const _Child &child) noexcept |
Named permutations and related element-manipulation operations for vectors and masks.
Groups xvec's named-permutation family with the proposal "Named permutation functions for std::simd".
template<vec_or_mask_type... _Sps>
| auto xvec::simd::zip |
( |
const _Sps &... | simds | ) |
|
|
constexpr |
zip takes one or more vec or mask values and produces a new object where all the i'th elements are moved into contiguous positions, for all values of i between [0..min_size_of_inputs). For example, zip([a b c d e], [0 1 2]) becomes [a 0 b 1 c 2]. Note the discard of [d e] to match the size of [0 1 2].