Core functions.
This module provides implementation for various fundamental functions
Contents | |
| Accuracy helpers | |
| Arithmetic operations | |
| Bitwise functions | |
| Compress functions | |
| Constants | |
| Builds a floating-point constant from the exact representation it must take in each precision. | |
| Conversions | |
| Decorators | |
| Fused multiply add family | |
| IEEE operations | |
| Logical operations | |
| Named Shuffles | |
| Predicates | |
| Reductions | |
| SIMD Specific Operations | |
Variables | |
| constexpr callable_deinterleave_groups_ | eve::deinterleave_groups = {} |
| Callabe object that deinterleaves values in n wides. | |
| constexpr callable_rotate_ | eve::rotate = {} |
| rotates two halves of the register by a chosen number of elements. | |
| constexpr callable_try_each_group_position_ | eve::try_each_group_position = {} |
| For a given simd_value and a group size returns a tuple of (x::size() / group_size) permuatitions for this register such that each group will be in each position exactly once. | |
|
inlineconstexpr |
Callabe object that deinterleaves values in n wides.
This is a generalization of deinterleave_groups_shuffle for n wides.
The different name comes from for 2 wides - this returns a tuple of 2 wides and a shuffle returns an aggregate
First parameter is fixed<N> group_size - how many elements we consider one element After that you pass n simd values. Together those n simd values have interleaved values. We return a tuple of wides, where all values are separated between individual wides.
NOTE: you can think of this function as AoS to SoA, where all fields have the same size. group is the size of the field in wide elements.
Examples (one letter is a group - first parameter, group order is preserved): ABAB'ABAB ABAB'ABAB => [AAAA'AAAA BBBB'BBBB] ABCA BCAB CABC => [AAAA BBBB CCCC] ABCD'EABC DEAB'CDEA BCDE'ABCD EABC'DEA BCDE'ABCD => [Ax8 Bx8 Cx8 Dx8 Ex8]
Required header: #include <eve/module/core.hpp>
|
inlineconstexpr |
rotates two halves of the register by a chosen number of elements.
Parameters
Return value
Return T which is a permutation of x such that elements x[M: T::size()) come first followed by x[0:M) and the relative order in those halves is preserved.
|
inlineconstexpr |
For a given simd_value and a group size returns a tuple of (x::size() / group_size) permuatitions for this register such that each group will be in each position exactly once.
This is useful when one needs to try each element against something. Motivational example could be intersection: try each element from one register against another. Groups allow you to treat N elements as one.
We took the idea for the operation from: "Faster-Than-Native Alternatives for x86 VP2INTERSECT Instructions" by Guillermo Diez-Canas. Link: https://arxiv.org/abs/2112.06342
Parameters
Return value
kumi::tuple of all results