Skip to content

Function blend

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

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

Blends lanes from x and y according to a repeating selector pattern.

The index pattern i selects, for each output lane, whether to take from x or from y. A selector value of 0 picks x; a value of 1 picks y. The pattern is tiled across all N lanes.

Template parameters
Indices Compile-time index list defining the per-tile source selection (0 for x, 1 for y).
T Element type of the vectors.
N Length of each input vector.
Parameters
x First source vector.
y Second source vector.
i Selector pattern.
Returns
A vector of length N blending lanes from x and y.

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

Declared at simd/shuffle.hpp:899

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