Skip to content

Function even

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

template <size_t group = 1, typename T, size_t N, size_t Nout = N / 2>
    requires(N >= 2 && (N & 1) == 0)
KFR_INTRINSIC vec<T, Nout> even(const vec<T, N>& x)

Extracts the even-indexed elements of x (with optional grouping).

Elements at indices 0, 2* group, 4* group, ... are gathered into the result.

Template parameters
group Stride between consecutive selected pairs.
T Element type of the vector.
N Input vector length, must be even and at least 2.
Nout Output length, defaults to N / 2.
Parameters
x Source vector.
Returns
A vector of length Nout holding the even-indexed elements of x.

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

Declared at simd/shuffle.hpp:630

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