Mjolnir Core
Core functionality of the Mjolnir API

◆ permute()

auto permute ( T_RegisterType  src) -> T_RegisterType
inlinenoexcept

Shuffle the elements of a vector register within lanes using indices and return the result in a new register.

Template Parameters
t_indicesA set of indices equal to the number of register elements or the number of lane elements. In the latter case the permutation pattern is identical for all lanes. The N-th index selects the value for the N-th element/lane element. Index values may not exceed the lane size of a register. Otherwise a compile-time error is triggered.
T_RegisterTypeThe register type
Parameters
[in]srcThe source register
Returns
New register with shuffled values
Todo:
assert that the 8 indices for the __m256 case do not exceed number of lane elements. Maybe write a generalized function for integer based parameter packs