Skip to content

Function gather

function gather(const T *, size_t, Indices...) simd

template <typename... Indices, typename T, size_t Nout = 1 + sizeof...(Indices)>
KFR_INTRINSIC vec<T, Nout> gather(const T* base, size_t index, Indices... indices)

Gathers elements from base at the given runtime indices.

Template parameters
Indices Types of the additional index arguments (must be convertible to size_t).
T Element type.
Nout Output vector length (deduced as 1 + sizeof...(Indices)).
Parameters
base Pointer to the source array.
index Index of the first element to gather.
indices Indices of the remaining elements to gather.
Returns
A vector holding base[index], base[indices]... in order.

Fully qualified name: kfr::gather(const T *, size_t, Indices...)

Function gather

function gather(const T *) simd

template <size_t Index, size_t... Indices, typename T, size_t Nout = 1 + sizeof...(Indices)>
KFR_INTRINSIC vec<T, Nout> gather(const T* base)

Gathers elements from base at the given compile-time indices.

Template parameters
Index First compile-time index.
Indices Remaining compile-time indices.
T Element type.
Nout Output vector length (deduced as 1 + sizeof...(Indices)).
Parameters
base Pointer to the source array.
Returns
A vector holding base[Index], base[Indices]... in order.

Fully qualified name: kfr::gather(const T *)

Function gather

function gather(const T *, const vec<u32, N> &) simd

template <typename T, size_t N>
KFR_INTRINSIC vec<T, N> gather(const T* base, const vec<u32, N>& indices)

Gathers elements from base using a vector of indices.

Template parameters
T Element type.
N Number of indices (and output length).
Parameters
base Pointer to the source array.
indices Vector of u32 indices into base.
Returns
A vector holding base[indices[0]], base[indices[1]], ... in order.

Fully qualified name: kfr::gather(const T *, const vec<u32, N> &)

Function gather

function gather(const T *, const vec<IT, N> &) simd

template <size_t groupsize = 1, typename T, size_t N, typename IT>
KFR_INTRINSIC vec<T, N * groupsize> gather(const T* base, const vec<IT, N>& offset)

Gathers N groups of groupsize contiguous elements from base using a vector of offsets.

Template parameters
groupsize Number of contiguous elements per group.
T Element type.
N Number of offsets (and groups).
IT Offset integer type.
Parameters
base Pointer to the source array.
offset Vector of offsets (in groups) into base.
Returns
A vector of N*groupsize elements assembled from the gathered groups.

Fully qualified name: kfr::gather(const T *, const vec<IT, N> &)

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