Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling > Class Template Reference

#include <TensorExecutor.h>

Public Types

typedef Expression::Index StorageIndex
 

Static Public Member Functions

static EIGEN_STRONG_INLINE void run (const Expression &expr, const Device &device=DefaultDevice())
 

Detailed Description

template<typename Expression, typename Device, bool Vectorizable, TiledEvaluation Tiling>
class Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >

Default strategy: the expression is evaluated sequentially with a single cpu thread, without vectorization and block evaluation.

Member Typedef Documentation

◆ StorageIndex

template<typename Expression , typename Device , bool Vectorizable, TiledEvaluation Tiling>
typedef Expression::Index Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::StorageIndex

Member Function Documentation

◆ run()

template<typename Expression , typename Device , bool Vectorizable, TiledEvaluation Tiling>
static EIGEN_STRONG_INLINE void Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run ( const Expression &  expr,
const Device &  device = DefaultDevice() 
)
inlinestatic
92  {
93  TensorEvaluator<Expression, Device> evaluator(expr, device);
94  const bool needs_assign = evaluator.evalSubExprsIfNeeded(NULL);
95  if (needs_assign) {
96  const StorageIndex size = array_prod(evaluator.dimensions());
97  for (StorageIndex i = 0; i < size; ++i) {
98  evaluator.evalScalar(i);
99  }
100  }
101  evaluator.cleanup();
102  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Scalar Scalar int size
Definition: benchVecAdd.cpp:17
Expression::Index StorageIndex
Definition: TensorExecutor.h:80
constexpr EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE auto array_prod(const array< T, N > &arr) -> decltype(array_reduce< product_op, T, N >(arr, static_cast< T >(1)))
Definition: MoreMeta.h:497

References Eigen::internal::array_prod(), i, and size.

Referenced by Eigen::TensorDevice< ExpressionType, DeviceType >::operator+=(), Eigen::TensorDevice< ExpressionType, DeviceType >::operator-=(), Eigen::TensorBase< Derived, AccessLevel >::operator=(), Eigen::TensorDevice< ExpressionType, DeviceType >::operator=(), Eigen::Tensor< Scalar_, NumIndices_, Options_, IndexType_ >::operator=(), Eigen::TensorEvaluator< const TensorConvolutionOp< Indices, InputArgType, KernelArgType >, Device >::preloadKernel(), Eigen::TensorEvaluator< const TensorConvolutionOp< Indices, InputArgType, KernelArgType >, Eigen::SyclDevice >::preloadKernel(), Eigen::Tensor< Scalar_, NumIndices_, Options_, IndexType_ >::Tensor(), and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize().


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