Skip to content

Function interleave

function interleave(const vec<T, N> &, const vec<T, N> &) simd

template <size_t group = 1, typename T, size_t N, size_t Nout = N * 2, size_t size = Nout / group,
          size_t side2 = 2, size_t side1 = size / side2>
KFR_INTRINSIC vec<T, Nout> interleave(const vec<T, N>& x, const vec<T, N>& y)

Interleaves the lanes of two equal-length vectors x and y.

Produces a vector of length N * 2 where lanes from x and y alternate. With group > 1, groups of group consecutive lanes are interleaved as units.

Template parameters
group Number of lanes in each interleaved group.
T Element type of the vectors.
N Length of each input vector.
Nout Output length, defaults to N * 2.
size Number of groups, equals Nout / group.
side2 Number of sources, fixed at 2.
side1 Groups per source, equals size / side2.
Parameters
x First source vector.
y Second source vector.
Returns
A vector of length Nout with lanes from x and y interleaved.

Fully qualified name: kfr::interleave(const vec<T, N> &, const vec<T, N> &)

Declared at simd/shuffle.hpp:1237

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