Eigen::internal::GenericDimReducer< DimIndex, Self, Op > Struct Template Reference

#include <TensorReduction.h>

Static Public Member Functions

static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce (const Self &self, typename Self::Index firstIndex, Op &reducer, typename Self::CoeffReturnType *accum)
 

Member Function Documentation

◆ reduce()

template<int DimIndex, typename Self , typename Op >
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void Eigen::internal::GenericDimReducer< DimIndex, Self, Op >::reduce ( const Self &  self,
typename Self::Index  firstIndex,
Op &  reducer,
typename Self::CoeffReturnType *  accum 
)
inlinestatic
140  {
141  EIGEN_STATIC_ASSERT((DimIndex > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
142  for (int j = 0; j < self.m_reducedDims[DimIndex]; ++j) {
143  const typename Self::Index input = firstIndex + j * self.m_reducedStrides[DimIndex];
144  GenericDimReducer<DimIndex - 1, Self, Op>::reduce(self, input, reducer, accum);
145  }
146  }
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void reduce(const Self &self, typename Self::Index firstIndex, Op &reducer, typename Self::CoeffReturnType *accum)
Definition: TensorReduction.h:139
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References EIGEN_STATIC_ASSERT, and j.

Referenced by Eigen::TensorReductionEvaluatorBase< const TensorReductionOp< Op, Dims, ArgType, MakePointer_ >, Device >::coeff(), and Eigen::TensorSycl::internal::GenericNondeterministicReducer< Evaluator, OpType >::operator()().


The documentation for this struct was generated from the following file: