35#ifndef _BLAZE_MATH_SIMD_REDUCE_H_
36#define _BLAZE_MATH_SIMD_REDUCE_H_
67template<
typename T,
typename OP >
70 using ValueType =
typename T::ValueType;
72 alignas( AlignmentOf_v<ValueType> ) ValueType array[
T::size];
75 ValueType redux( array[0UL] );
76 for(
size_t k=1UL; k<
T::size; ++k ) {
77 redux = op( redux, array[k] );
94inline decltype(
auto)
reduce(
const SIMDPack<T>& a,
const Add& )
110template<
typename T >
111inline decltype(
auto)
reduce(
const SIMDPack<T>& a,
const Mult& )
Header file for the AlignmentOf type trait.
Header file for the SIMD multiplication reduction functionality.
Header file for the SIMD aligned store functionality.
Header file for the SIMD addition reduction functionality.
Base class for all SIMD data types.
Definition: SIMDPack.h:64
decltype(auto) prod(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of multiplication.
Definition: DMatReduceExpr.h:2229
decltype(auto) sum(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of addition.
Definition: DMatReduceExpr.h:2156
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:676
decltype(auto) reduce(const SIMDPack< T > &a, OP op)
Reduces the elements in the given SIMD vector.
Definition: Reduce.h:68
BLAZE_ALWAYS_INLINE EnableIf_t< IsIntegral_v< T1 > &&HasSize_v< T1, 1UL > > storea(T1 *address, const SIMDi8< T2 > &value) noexcept
Aligned store of a vector of 1-byte integral values.
Definition: Storea.h:78
Header file for all functor forward declarations.
Header file for the SIMDPack base class.