Skip to content

Function combine

function combine(const vec<T, N1> &, const vec<T, N2> &) simd

template <typename T, size_t N1, size_t N2>
KFR_INTRINSIC vec<T, N1> combine(const vec<T, N1>& x, const vec<T, N2>& y)

Combines two vectors by selecting lanes from x or y based on index.

For lane indices in [0, N2) the lane is taken from x; for indices >= N2 the lane is taken from y. y is extended to length N1 before the selection.

Template parameters
T Element type of the vectors.
N1 Length of the first (longer) input vector and the output.
N2 Length of the second (shorter) input vector, must be <= N1.
Parameters
x First source vector.
y Second source vector.
Returns
A vector of length N1 combining lanes from x and y.

Fully qualified name: kfr::combine(const vec<T, N1> &, const vec<T, N2> &)

Declared at simd/shuffle.hpp:1373

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