Skip to content

function hsum(const vec<T, N> &) horizontal

template <typename T, size_t N>
KFR_INTRINSIC T hsum(const vec<T, N>& value)

Computes the sum of all elements in the vector.

Template parameters
T The element type of the vector.
N The number of elements in the vector.
Parameters
value The input vector.
Returns
The sum of all vector elements.

Defined at simd/horizontal.hpp:100