Reducers

template<class T, class A>
T xsimd::reduce_add(batch<T, A> const &x)

Adds all the scalars of the batch x.

Return
the result of the reduction.
Parameters
  • x: batch involved in the reduction

template<class T, class A>
T xsimd::reduce_max(batch<T, A> const &x)

Max of all the scalars of the batch x.

Return
the result of the reduction.
Parameters
  • x: batch involved in the reduction

template<class T, class A>
T xsimd::reduce_min(batch<T, A> const &x)

Min of all the scalars of the batch x.

Return
the result of the reduction.
Parameters
  • x: batch involved in the reduction

template<class T, class A>
batch<T, A> xsimd::haddp(batch<T, A> const *row)

Parallel horizontal addition: adds the scalars of each batch in the array pointed by row and store them in a returned batch.

Return
the result of the reduction.
Parameters
  • row: an array of N batches