vir-simd 0.4.189
Parallelism TS 2 extensions and simd fallback implementation
Loading...
Searching...
No Matches
vir::simd_permutations Namespace Reference

Predefined permutations. More...

Variables

constexpr DuplicateEven duplicate_even {}
 Copies even elements into odd elements.
 
constexpr DuplicateOdd duplicate_odd {}
 Copies odd elements into even elements.
 
template<unsigned N = 1u>
constexpr SwapNeighbors< N > swap_neighbors {}
 Swaps N neighboring elements.
 
template<int Position>
constexpr Broadcast< Position > broadcast {}
 Copy element at index Position into all elements.
 
constexpr Broadcast< 0 > broadcast_first {}
 Copy the first element into all elements.
 
constexpr Broadcast<-1 > broadcast_last {}
 Copy the last element into all elements.
 
constexpr Reverse reverse {}
 Reverse the elements.
 
template<int Offset>
constexpr Rotate< Offset > rotate {}
 Rotate the elements by Offset.
 
template<int Offset>
constexpr Shift< Offset > shift {}
 Shift the elements by Offset.
 

Detailed Description

Predefined permutations.

Variable Documentation

◆ swap_neighbors

template<unsigned N = 1u>
SwapNeighbors<N> vir::simd_permutations::swap_neighbors {}
inlineconstexpr

Swaps N neighboring elements.

Template Parameters
NFor N == 1 swaps actual neighbors. Otherwise consider N elements to be one entity to be swapped with the corresponding N neighboring elements.