Functions that are just shuffles with a different api.
Variables | |
| constexpr auto | eve::blend = _::named_shuffle_2<blend_t> {} |
| a named shuffle for mixing 2 registers together, without changing positions. | |
| constexpr auto | eve::broadcast_lane = _::named_shuffle_1<broadcast_lane_t> {} |
| a named shuffle for duplicating the lane across a register. | |
| constexpr auto | eve::reverse = _::named_shuffle_1<reverse_t> {} |
| a named shuffle for reversing a register. | |
| constexpr auto | eve::reverse_in_subgroups = _::named_shuffle_1<reverse_in_subgroups_t> {} |
| a named shuffle for reversing all subgroups in a register | |
| constexpr auto | eve::swap_adjacent = _::named_shuffle_1<swap_adjacent_t> {} |
| a named shuffle that goes all pairs of elements and swaps them: [0, 1, 2, 3] => [1, 0, 3, 2] | |
| constexpr callable_slide_left_ | eve::slide_left = {} |
| a named shuffles for sliding two simd values together and selecting one register. Common names for this would also include "shift", "extract". Second value can be omitted for an implicit zero. | |
|
inlineconstexpr |
a named shuffle for mixing 2 registers together, without changing positions.
Defined in Header
(TODO: support mixing more than 2 registers)
Accepts a pattern with just 0 and 1 that indicates number of the element for the current slot
blend([0, 1, 2, 3], [4, 5, 6, 7], pattern<1, 0, 0, 1>) -> [4, 1, 2, 7].
As any named shuffle, allows to specify a group size.
Parameters
Return value
Returns a register with elements selected according to the mask.
|
inlineconstexpr |
a named shuffle for duplicating the lane across a register.
Defined in Header
As any named shuffle, allows to pass a group size, to treat multiple elements as one. Group size has to be 0 < G <= T::size()
Parameters
(2) calls (1) with G == 1; (1) broadcasts the group of size G in position I to all register.
Return value
shuffled register
|
inlineconstexpr |
a named shuffle for reversing a register.
Defined in Header
As any named shuffle, allows to pass a group size, to treat multiple elements as one. Group size has to be 0 < G <= T::size()
Parameters
(2) calls (1) with G == 1; (1) reverses positions of adjacent groups of elements of size G
Return value
Return x where groups of contiguous G elements are reversed.
|
inlineconstexpr |
a named shuffle for reversing all subgroups in a register
Defined in Header
As any named shuffle, allows to pass a group size, to treat multiple elements as one. Group size has to be 0 < G <= T::size() Subgroup size has to be 1 <= SubG <= T::size() / G
Parameters
(2) calls (1) with G == 1; (1) within each SubG reverses positions elements
Return value
Returns x where each subgroup is reversed.
|
inlineconstexpr |
a named shuffles for sliding two simd values together and selecting one register. Common names for this would also include "shift", "extract". Second value can be omitted for an implicit zero.
Defined in Header
As any named shuffle, allows to pass a group size, to treat multiple elements as one. Group size has to be 0 < G <= T::size() Shift * GroupSize <= T::size() Shift >= 0
Parameters
S - shift by how many elements to shift
(2), (4) - call (1) (3) respectively, with S = G * S (1) - equivalent to calling eve::slide_left(x, eve::zero(eve::as(x))); (3) - slide_left [abcd], [efgh], index<1> ==> [bcde]
Return value shuffled register
|
inlineconstexpr |
a named shuffle that goes all pairs of elements and swaps them: [0, 1, 2, 3] => [1, 0, 3, 2]
Defined in Header
Can apply an opteration for group of elements instead of elements. Group size has to be 0 < G < T::size()
Parameters
Return value
Return x where groups of contiguous G elements are swapped.