Skip to content

Function permute

function permute(const vec<T, N> &, elements_t<Indices...>) simd

template <size_t... Indices, typename T, size_t N, size_t count = sizeof...(Indices)>
KFR_INTRINSIC vec<T, N> permute(const vec<T, N>& x, elements_t<Indices...> i = elements_t<Indices...>())

Permutes the lanes of x using a repeating index pattern.

The index pattern i is tiled to cover all N output lanes, with each tile offset by its tile index times count.

Template parameters
Indices Compile-time index list defining the per-tile source selection.
T Element type of the vector.
N Input vector length.
count Number of indices in Indices.
Parameters
x Source vector.
i Index pattern selector.
Returns
A vector of length N with lanes permuted according to i.

Fully qualified name: kfr::permute(const vec<T, N> &, elements_t<Indices...>)

Declared at simd/shuffle.hpp:759

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.