Skip to content

Function onoff

function onoff(cint_t<on>, cint_t<off>) simd

template <typename T, size_t N, size_t start = 0, size_t size = 1, int on = 1, int off = 0>
constexpr KFR_INTRINSIC vec<T, N> onoff(cint_t<on> = cint_t<on>(), cint_t<off> = cint_t<off>()) { … }

Generates a vector with an on/off pattern over a contiguous range.

Lanes in [ start, start + size) are set to on; all others are set to off.

Template parameters
T Element type of the resulting vector.
N Output vector length.
start Index of the first "on" lane.
size Number of consecutive "on" lanes.
on Value for lanes inside the range.
off Value for lanes outside the range.
Returns
A vector of length N holding the on/off pattern.

Fully qualified name: kfr::onoff(cint_t<on>, cint_t<off>)

Declared at simd/shuffle.hpp:1479

Function onoff

function onoff(vec_shape<T, N>, cint_t<on>, cint_t<off>) simd

template <size_t start = 0, size_t size = 1, int on = 1, int off = 0, typename T, size_t N>
constexpr KFR_INTRINSIC vec<T, N> onoff(vec_shape<T, N>, cint_t<on> = cint_t<on>(),
                                        cint_t<off> = cint_t<off>()) { … }

Shape-driven overload of onoff() for type deduction.

onoff

Fully qualified name: kfr::onoff(vec_shape<T, N>, cint_t<on>, cint_t<off>)

Declared at simd/shuffle.hpp:1488

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