10#ifndef EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H
11#define EIGEN_CXX11_TENSOR_TENSOR_FORCED_EVAL_H
23template<
typename XprType>
27 typedef typename XprType::Scalar
Scalar;
31 typedef typename XprType::Nested
Nested;
33 static const int NumDimensions = XprTraits::NumDimensions;
34 static const int Layout = XprTraits::Layout;
42template<
typename XprType>
48template<
typename XprType>
58template<
typename XprType>
81template <
typename Device,
typename CoeffReturnType>
83 template <
typename StorageType>
95template <
typename CoeffReturnType>
97 template <
typename StorageType>
103template<
typename ArgType_,
typename Device>
139 : m_impl(op.expression(), device), m_op(op.expression()),
152 EvalTo evalToTmp(
m_device.get(m_buffer), m_op);
163#ifdef EIGEN_USE_THREADS
164 template <
typename EvalSubExprsCallback>
172 EvalTo evalToTmp(
m_device.get(m_buffer), m_op);
174 auto on_done = std::bind([](EvalSubExprsCallback done_) { done_(
true); },
176 internal::TensorAsyncExecutor<
192 return m_buffer[index];
195 template<
int LoadMode>
208 bool =
false)
const {
209 assert(m_buffer != NULL);
210 return TensorBlock::materialize(m_buffer, m_impl.dimensions(), desc, scratch);
228 TensorEvaluator<ArgType, Device> m_impl;
int i
Definition BiCGSTAB_step_by_step.cpp:9
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_DEVICE_REF
Definition TensorMacros.h:50
Generic expression where a coefficient-wise binary operator is applied to two expressions.
Definition CwiseBinaryOp.h:84
The tensor base class.
Definition TensorBase.h:973
Definition TensorEvalTo.h:69
Definition TensorForcedEval.h:60
Eigen::internal::traits< TensorForcedEvalOp >::Scalar Scalar
Definition TensorForcedEval.h:62
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorForcedEvalOp(const XprType &expr)
Definition TensorForcedEval.h:69
Eigen::internal::traits< TensorForcedEvalOp >::Index Index
Definition TensorForcedEval.h:67
XprType::Nested m_xpr
Definition TensorForcedEval.h:77
Eigen::internal::traits< TensorForcedEvalOp >::StorageKind StorageKind
Definition TensorForcedEval.h:66
Eigen::internal::nested< TensorForcedEvalOp >::type Nested
Definition TensorForcedEval.h:65
Eigen::NumTraits< Scalar >::Real RealScalar
Definition TensorForcedEval.h:63
internal::remove_const< typenameXprType::CoeffReturnType >::type CoeffReturnType
Definition TensorForcedEval.h:64
EIGEN_DEVICE_FUNC const internal::remove_all< typenameXprType::Nested >::type & expression() const
Definition TensorForcedEval.h:74
Definition TensorCostModel.h:25
Definition TensorExecutor.h:81
Definition TensorRef.h:81
Definition TensorBlock.h:656
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::ptrdiff_t array_prod(const Sizes< Indices... > &)
Definition TensorDimensions.h:140
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition BandTriangularSolver.h:13
Definition Constants.h:507
Definition TensorMeta.h:50
Definition TensorForwardDeclarations.h:37
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorForcedEval.h:131
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorForcedEval.h:145
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorForcedEval.h:196
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
Definition TensorForcedEval.h:109
XprType::Index Index
Definition TensorForcedEval.h:110
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorForcedEval.h:138
ArgType::Scalar Scalar
Definition TensorForcedEval.h:108
EIGEN_STRONG_INLINE void cleanup()
Definition TensorForcedEval.h:185
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorForcedEval.h:207
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition TensorForcedEval.h:190
Eigen::internal::traits< XprType >::PointerType TensorPointerType
Definition TensorForcedEval.h:114
Storage::Type EvaluatorPointerType
Definition TensorForcedEval.h:116
TensorForcedEvalOp< ArgType > XprType
Definition TensorForcedEval.h:107
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorForcedEval.h:213
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorForcedEval.h:143
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorForcedEval.h:112
internal::TensorMaterializedBlock< CoeffReturnType, NumDims, Layout, Index > TensorBlock
Definition TensorForcedEval.h:135
const internal::remove_all< ArgType_ >::type ArgType
Definition TensorForcedEval.h:106
internal::TensorBlockDescriptor< NumDims, Index > TensorBlockDesc
Definition TensorForcedEval.h:130
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const
Definition TensorForcedEval.h:218
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorForcedEval.h:115
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorForcedEval.h:202
XprType::CoeffReturnType CoeffReturnType
Definition TensorForcedEval.h:111
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition TensorEvaluator.h:29
const Device EIGEN_DEVICE_REF m_device
Definition TensorEvaluator.h:192
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:39
Derived::Scalar CoeffReturnType
Definition TensorEvaluator.h:32
@ BlockAccess
Definition TensorEvaluator.h:48
@ PreferBlockAccess
Definition TensorEvaluator.h:49
@ PacketAccess
Definition TensorEvaluator.h:47
@ Layout
Definition TensorEvaluator.h:50
@ IsAligned
Definition TensorEvaluator.h:46
internal::TensorMaterializedBlock< ScalarNoConst, NumCoords, Layout, Index > TensorBlock
Definition TensorEvaluator.h:63
Derived::Dimensions Dimensions
Definition TensorEvaluator.h:34
static const int PacketSize
Definition TensorEvaluator.h:36
Definition TensorForwardDeclarations.h:164
static const TiledEvaluation value
Definition TensorForwardDeclarations.h:172
Definition TensorForwardDeclarations.h:147
static const bool value
Definition TensorForwardDeclarations.h:148
Definition TensorBlock.h:75
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockResourceRequirements any()
Definition TensorBlock.h:155
const TensorForcedEvalOp< XprType > & type
Definition TensorForcedEval.h:45
Definition XprHelper.h:332
TensorForcedEvalOp< XprType > type
Definition TensorForcedEval.h:51
Definition TensorTraits.h:175
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(Index, StorageType)
Definition TensorForcedEval.h:98
Definition TensorForcedEval.h:82
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void operator()(Index numValues, StorageType m_buffer)
Definition TensorForcedEval.h:84
T type
Definition Meta.h:121
XprType::Nested Nested
Definition TensorForcedEval.h:31
traits< XprType > XprTraits
Definition TensorForcedEval.h:28
remove_reference< Nested >::type _Nested
Definition TensorForcedEval.h:32
traits< XprType >::Index Index
Definition TensorForcedEval.h:30
XprType::Scalar Scalar
Definition TensorForcedEval.h:27
XprTraits::PointerType PointerType
Definition TensorForcedEval.h:35
traits< XprType >::StorageKind StorageKind
Definition TensorForcedEval.h:29
Definition ForwardDeclarations.h:17