10#ifndef EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H
11#define EIGEN_CXX11_TENSOR_TENSOR_EVALUATOR_H
27template<
typename Derived,
typename Device>
30 typedef typename Derived::Index
Index;
31 typedef typename Derived::Scalar
Scalar;
83#ifdef EIGEN_USE_THREADS
84 template <
typename EvalSubExprsCallback>
159 bool =
false)
const {
161 return TensorBlock::materialize(
m_data,
m_dims, desc, scratch);
164 template<
typename TensorBlock>
169 typedef typename TensorBlock::XprType TensorBlockExpr;
174 TensorBlockAssign::Run(
175 TensorBlockAssign::target(desc.dimensions(),
197T loadConstant(
const T* address) {
201#if defined(EIGEN_CUDA_ARCH) && EIGEN_CUDA_ARCH >= 350
203float loadConstant(
const float* address) {
204 return __ldg(address);
207double loadConstant(
const double* address) {
208 return __ldg(address);
217template <cl::sycl::access::mode AcMd,
typename T>
218T &loadConstant(
const Eigen::TensorSycl::internal::RangeAccess<AcMd, T> &address) {
226template<
typename Derived,
typename Device>
229 typedef typename Derived::Index
Index;
279#ifdef EIGEN_USE_THREADS
280 template <
typename EvalSubExprsCallback>
292 return loadConstant(
m_data+index);
316 :
m_dims.IndexOfRowMajor(coords);
317 return loadConstant(
m_data+index);
332 bool =
false)
const {
334 return TensorBlock::materialize(
m_data,
m_dims, desc, scratch);
355template<
typename NullaryOp,
typename ArgType,
typename Device>
361 : m_functor(op.functor()), m_argImpl(op.nestedExpression(), device), m_wrapper()
376 #ifdef EIGEN_USE_SYCL
395#ifdef EIGEN_USE_THREADS
396 template <
typename EvalSubExprsCallback>
407 return m_wrapper(m_functor, index);
410 template<
int LoadMode>
413 return m_wrapper.template packetOp<PacketReturnType, Index>(m_functor, index);
432 const NullaryOp m_functor;
433 TensorEvaluator<ArgType, Device> m_argImpl;
434 const internal::nullary_wrapper<CoeffReturnType,NullaryOp> m_wrapper;
441template<
typename UnaryOp,
typename ArgType,
typename Device>
459 m_functor(op.functor()),
460 m_argImpl(op.nestedExpression(), device)
488 m_argImpl.evalSubExprsIfNeeded(NULL);
492#ifdef EIGEN_USE_THREADS
493 template <
typename EvalSubExprsCallback>
496 m_argImpl.evalSubExprsIfNeededAsync(
nullptr, [done](
bool) { done(
true); });
506 return m_functor(m_argImpl.coeff(index));
509 template<
int LoadMode>
512 return m_functor.packetOp(m_argImpl.template packet<LoadMode>(index));
517 return m_argImpl.costPerCoeff(vectorized) +
524 return m_argImpl.getResourceRequirements().addCostPerCoeff(
530 bool =
false)
const {
531 return TensorBlock(m_argImpl.block(desc, scratch), m_functor);
546 const UnaryOp m_functor;
547 TensorEvaluator<ArgType, Device> m_argImpl;
553template<
typename BinaryOp,
typename LeftArgType,
typename RightArgType,
typename Device>
575 m_functor(op.functor()),
576 m_leftImpl(op.lhsExpression(), device),
577 m_rightImpl(op.rhsExpression(), device)
612 return m_leftImpl.dimensions();
616 m_leftImpl.evalSubExprsIfNeeded(NULL);
617 m_rightImpl.evalSubExprsIfNeeded(NULL);
621#ifdef EIGEN_USE_THREADS
622 template <
typename EvalSubExprsCallback>
626 m_leftImpl.evalSubExprsIfNeededAsync(
nullptr, [
this, done](
bool) {
627 m_rightImpl.evalSubExprsIfNeededAsync(
nullptr,
628 [done](
bool) { done(
true); });
634 m_leftImpl.cleanup();
635 m_rightImpl.cleanup();
640 return m_functor(m_leftImpl.coeff(index), m_rightImpl.coeff(index));
642 template<
int LoadMode>
645 return m_functor.packetOp(m_leftImpl.template packet<LoadMode>(index), m_rightImpl.template packet<LoadMode>(index));
651 return m_leftImpl.costPerCoeff(vectorized) +
652 m_rightImpl.costPerCoeff(vectorized) +
660 m_leftImpl.getResourceRequirements(),
661 m_rightImpl.getResourceRequirements())
662 .addCostPerCoeff({0, 0, functor_cost /
PacketSize});
667 bool =
false)
const {
669 return TensorBlock(m_leftImpl.block(desc, scratch),
670 m_rightImpl.block(desc, scratch), m_functor);
675 #ifdef EIGEN_USE_SYCL
678 m_leftImpl.bind(cgh);
679 m_rightImpl.bind(cgh);
684 const BinaryOp m_functor;
685 TensorEvaluator<LeftArgType, Device> m_leftImpl;
686 TensorEvaluator<RightArgType, Device> m_rightImpl;
691template<
typename TernaryOp,
typename Arg1Type,
typename Arg2Type,
typename Arg3Type,
typename Device>
712 : m_functor(op.functor()),
713 m_arg1Impl(op.arg1Expression(), device),
714 m_arg2Impl(op.arg2Expression(), device),
715 m_arg3Impl(op.arg3Expression(), device)
721 STORAGE_KIND_MUST_MATCH)
724 STORAGE_KIND_MUST_MATCH)
727 STORAGE_INDEX_MUST_MATCH)
730 STORAGE_INDEX_MUST_MATCH)
751 return m_arg1Impl.dimensions();
755 m_arg1Impl.evalSubExprsIfNeeded(NULL);
756 m_arg2Impl.evalSubExprsIfNeeded(NULL);
757 m_arg3Impl.evalSubExprsIfNeeded(NULL);
761 m_arg1Impl.cleanup();
762 m_arg2Impl.cleanup();
763 m_arg3Impl.cleanup();
768 return m_functor(m_arg1Impl.coeff(index), m_arg2Impl.coeff(index), m_arg3Impl.coeff(index));
770 template<
int LoadMode>
773 return m_functor.packetOp(m_arg1Impl.template packet<LoadMode>(index),
774 m_arg2Impl.template packet<LoadMode>(index),
775 m_arg3Impl.template packet<LoadMode>(index));
781 return m_arg1Impl.costPerCoeff(vectorized) +
782 m_arg2Impl.costPerCoeff(vectorized) +
783 m_arg3Impl.costPerCoeff(vectorized) +
792 m_arg1Impl.bind(cgh);
793 m_arg2Impl.bind(cgh);
794 m_arg3Impl.bind(cgh);
799 const TernaryOp m_functor;
800 TensorEvaluator<Arg1Type, Device> m_arg1Impl;
801 TensorEvaluator<Arg2Type, Device> m_arg2Impl;
802 TensorEvaluator<Arg3Type, Device> m_arg3Impl;
808template<
typename IfArgType,
typename ThenArgType,
typename ElseArgType,
typename Device>
832 : m_condImpl(op.ifExpression(), device),
833 m_thenImpl(op.thenExpression(), device),
834 m_elseImpl(op.elseExpression(), device)
863 struct TensorSelectOpBlockFactory {
864 template <
typename IfArgXprType,
typename ThenArgXprType,
typename ElseArgXprType>
869 template <
typename IfArgXprType,
typename ThenArgXprType,
typename ElseArgXprType>
871 const IfArgXprType& if_expr,
const ThenArgXprType& then_expr,
const ElseArgXprType& else_expr)
const {
877 IfArgTensorBlock, ThenArgTensorBlock,
885 return m_condImpl.dimensions();
889 m_condImpl.evalSubExprsIfNeeded(NULL);
890 m_thenImpl.evalSubExprsIfNeeded(NULL);
891 m_elseImpl.evalSubExprsIfNeeded(NULL);
895#ifdef EIGEN_USE_THREADS
896 template <
typename EvalSubExprsCallback>
899 m_condImpl.evalSubExprsIfNeeded(
nullptr, [
this, done](
bool) {
900 m_thenImpl.evalSubExprsIfNeeded(
nullptr, [
this, done](
bool) {
901 m_elseImpl.evalSubExprsIfNeeded(
nullptr, [done](
bool) { done(
true); });
908 m_condImpl.cleanup();
909 m_thenImpl.cleanup();
910 m_elseImpl.cleanup();
915 return m_condImpl.coeff(index) ? m_thenImpl.coeff(index) : m_elseImpl.coeff(index);
917 template<
int LoadMode>
923 select.select[
i] = m_condImpl.coeff(index+
i);
926 m_thenImpl.template packet<LoadMode>(index),
927 m_elseImpl.template packet<LoadMode>(index));
933 return m_condImpl.costPerCoeff(vectorized) +
934 m_thenImpl.costPerCoeff(vectorized)
935 .
cwiseMax(m_elseImpl.costPerCoeff(vectorized));
940 auto then_req = m_thenImpl.getResourceRequirements();
941 auto else_req = m_elseImpl.getResourceRequirements();
945 merged_req.cost_per_coeff =
946 then_req.cost_per_coeff.cwiseMax(else_req.cost_per_coeff);
949 m_condImpl.getResourceRequirements(), merged_req);
954 bool =
false)
const {
960 m_condImpl.block(desc, scratch), m_thenImpl.block(desc, scratch),
961 m_elseImpl.block(desc, scratch), TensorSelectOpBlockFactory());
969 m_condImpl.bind(cgh);
970 m_thenImpl.bind(cgh);
971 m_elseImpl.bind(cgh);
975 TensorEvaluator<IfArgType, Device> m_condImpl;
976 TensorEvaluator<ThenArgType, Device> m_thenImpl;
977 TensorEvaluator<ElseArgType, Device> m_elseImpl;
Matrix3f m
Definition AngleAxis_mimic_euler.cpp:1
int i
Definition BiCGSTAB_step_by_step.cpp:9
#define EIGEN_ALWAYS_INLINE
Definition Macros.h:932
#define EIGEN_UNROLL_LOOP
Definition Macros.h:1461
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define eigen_assert(x)
Definition Macros.h:1037
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition StaticAssert.h:127
#define EIGEN_DEVICE_REF
Definition TensorMacros.h:50
Definition TensorExpr.h:197
Eigen::internal::traits< TensorCwiseBinaryOp >::Index Index
Definition TensorExpr.h:206
Eigen::internal::traits< TensorCwiseBinaryOp >::Scalar Scalar
Definition TensorExpr.h:201
Definition TensorExpr.h:53
Eigen::internal::traits< TensorCwiseNullaryOp >::Scalar Scalar
Definition TensorExpr.h:55
Eigen::internal::traits< TensorCwiseNullaryOp >::Index Index
Definition TensorExpr.h:60
Definition TensorExpr.h:279
Eigen::internal::traits< TensorCwiseTernaryOp >::Index Index
Definition TensorExpr.h:286
Eigen::internal::traits< TensorCwiseTernaryOp >::Scalar Scalar
Definition TensorExpr.h:281
Definition TensorExpr.h:116
Eigen::internal::traits< TensorCwiseUnaryOp >::Scalar Scalar
Definition TensorExpr.h:120
Eigen::internal::traits< TensorCwiseUnaryOp >::Index Index
Definition TensorExpr.h:125
Definition TensorCostModel.h:25
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost cwiseMax(const TensorOpCost &rhs) const
Definition TensorCostModel.h:106
Definition TensorExpr.h:353
Eigen::internal::traits< TensorSelectOp >::Index Index
Definition TensorExpr.h:361
Eigen::internal::traits< TensorSelectOp >::Scalar Scalar
Definition TensorExpr.h:355
Definition EmulateArray.h:21
Definition TensorBlock.h:1381
TensorBlockDescriptor & DropDestinationBuffer()
Definition TensorBlock.h:320
Definition TensorBlock.h:617
Definition TensorBlock.h:866
Definition TensorBlock.h:656
Definition TensorBlock.h:943
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition gnuplot_common_settings.hh:12
@ ColMajor
Definition Constants.h:319
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC EIGEN_CONSTEXPR __half_raw raw_uint16_to_half(numext::uint16_t x)
Definition Half.h:495
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
Definition PacketMath.h:2107
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE bool dimensions_match(Dims1 dims1, Dims2 dims2)
Definition TensorDimensions.h:484
Container::iterator get(Container &c, Position position)
Definition stdlist_overload.cpp:29
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition NumTraits.h:233
Definition TensorMeta.h:50
Definition TensorForwardDeclarations.h:37
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:232
EvaluatorPointerType m_data
Definition TensorEvaluator.h:345
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:337
internal::TensorBlockDescriptor< NumCoords, Index > TensorBlockDesc
Definition TensorEvaluator.h:257
const Device EIGEN_DEVICE_REF m_device
Definition TensorEvaluator.h:347
const Derived XprType
Definition TensorEvaluator.h:234
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(const array< DenseIndex, NumCoords > &coords) const
Definition TensorEvaluator.h:313
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:320
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:288
internal::traits< Derived >::template MakePointer< constScalar >::Type TensorPointerType
Definition TensorEvaluator.h:235
Derived::Scalar Scalar
Definition TensorEvaluator.h:230
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:237
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:296
Derived::Dimensions Dimensions
Definition TensorEvaluator.h:233
StorageMemory< const Scalar, Device > Storage
Definition TensorEvaluator.h:236
Derived::Index Index
Definition TensorEvaluator.h:229
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorEvaluator.h:326
internal::TensorMaterializedBlock< ScalarNoConst, NumCoords, Layout, Index > TensorBlock
Definition TensorEvaluator.h:262
internal::remove_const< Scalar >::type ScalarNoConst
Definition TensorEvaluator.h:239
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data)
Definition TensorEvaluator.h:271
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorEvaluator.h:258
Derived::Scalar CoeffReturnType
Definition TensorEvaluator.h:231
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
Definition TensorEvaluator.h:269
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:290
Dimensions m_dims
Definition TensorEvaluator.h:346
EIGEN_STRONG_INLINE TensorEvaluator(const Derived &m, const Device &device)
Definition TensorEvaluator.h:265
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::enable_if< internal::unpacket_traits< PacketReturnTypeT >::masked_load_available, PacketReturnTypeT >::type partialPacket(Index index, typename internal::unpacket_traits< PacketReturnTypeT >::mask_t umask) const
Definition TensorEvaluator.h:308
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorEvaluator.h:331
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorEvaluator.h:609
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:643
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorEvaluator.h:657
internal::TensorCwiseBinaryBlock< BinaryOp, LeftTensorBlock, RightTensorBlock > TensorBlock
Definition TensorEvaluator.h:606
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:633
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorEvaluator.h:615
TensorEvaluator< LeftArgType, Device >::Dimensions Dimensions
Definition TensorEvaluator.h:588
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:673
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:638
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:590
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorEvaluator.h:666
TensorCwiseBinaryOp< BinaryOp, LeftArgType, RightArgType > XprType
Definition TensorEvaluator.h:556
XprType::Index Index
Definition TensorEvaluator.h:583
TensorEvaluator< constRightArgType, Device >::TensorBlock RightTensorBlock
Definition TensorEvaluator.h:602
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorEvaluator.h:573
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:586
internal::TensorBlockDescriptor< NumDims, Index > TensorBlockDesc
Definition TensorEvaluator.h:596
internal::traits< XprType >::Scalar CoeffReturnType
Definition TensorEvaluator.h:585
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorEvaluator.h:589
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:649
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorEvaluator.h:597
TensorEvaluator< constLeftArgType, Device >::TensorBlock LeftTensorBlock
Definition TensorEvaluator.h:600
XprType::Scalar Scalar
Definition TensorEvaluator.h:584
internal::traits< XprType >::Scalar CoeffReturnType
Definition TensorEvaluator.h:366
internal::TensorBlockNotImplemented TensorBlock
Definition TensorEvaluator.h:388
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:403
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:405
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorEvaluator.h:391
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:371
TensorCwiseNullaryOp< NullaryOp, ArgType > XprType
Definition TensorEvaluator.h:358
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorEvaluator.h:360
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorEvaluator.h:393
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
Definition TensorEvaluator.h:369
XprType::Index Index
Definition TensorEvaluator.h:364
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:367
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorEvaluator.h:370
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:417
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:411
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:422
XprType::Scalar Scalar
Definition TensorEvaluator.h:365
internal::traits< XprType >::Scalar CoeffReturnType
Definition TensorEvaluator.h:737
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorEvaluator.h:711
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:766
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:742
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:787
XprType::Scalar Scalar
Definition TensorEvaluator.h:736
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:779
TensorCwiseTernaryOp< TernaryOp, Arg1Type, Arg2Type, Arg3Type > XprType
Definition TensorEvaluator.h:694
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorEvaluator.h:748
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorEvaluator.h:754
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorEvaluator.h:741
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:760
XprType::Index Index
Definition TensorEvaluator.h:735
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:738
TensorEvaluator< Arg1Type, Device >::Dimensions Dimensions
Definition TensorEvaluator.h:740
internal::TensorBlockNotImplemented TensorBlock
Definition TensorEvaluator.h:745
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:771
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:504
XprType::Index Index
Definition TensorEvaluator.h:463
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorEvaluator.h:529
TensorEvaluator< ArgType, Device >::Dimensions Dimensions
Definition TensorEvaluator.h:469
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:500
internal::TensorBlockDescriptor< NumDims, Index > TensorBlockDesc
Definition TensorEvaluator.h:475
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorEvaluator.h:476
internal::remove_const< Scalar >::type ScalarNoConst
Definition TensorEvaluator.h:465
internal::TensorCwiseUnaryBlock< UnaryOp, ArgTensorBlock > TensorBlock
Definition TensorEvaluator.h:482
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorEvaluator.h:485
XprType::Scalar Scalar
Definition TensorEvaluator.h:464
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:467
TensorEvaluator< constArgType, Device >::TensorBlock ArgTensorBlock
Definition TensorEvaluator.h:479
internal::traits< XprType >::Scalar CoeffReturnType
Definition TensorEvaluator.h:466
TensorCwiseUnaryOp< UnaryOp, ArgType > XprType
Definition TensorEvaluator.h:444
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorEvaluator.h:470
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorEvaluator.h:522
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:515
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:534
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorEvaluator.h:457
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorEvaluator.h:487
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:471
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:510
TensorSelectOp< const IfArgXprType, const ThenArgXprType, const ElseArgXprType > type
Definition TensorEvaluator.h:866
XprType< IfArgXprType, ThenArgXprType, ElseArgXprType >::type expr(const IfArgXprType &if_expr, const ThenArgXprType &then_expr, const ElseArgXprType &else_expr) const
Definition TensorEvaluator.h:870
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorEvaluator.h:953
TensorEvaluator< constIfArgType, Device >::TensorBlock IfArgTensorBlock
Definition TensorEvaluator.h:857
EIGEN_DEVICE_FUNC CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:913
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:848
XprType::Scalar Scalar
Definition TensorEvaluator.h:812
TensorEvaluator(const XprType &op, const Device &device)
Definition TensorEvaluator.h:831
XprType::Index Index
Definition TensorEvaluator.h:842
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:932
TensorEvaluator< constElseArgType, Device >::TensorBlock ElseArgTensorBlock
Definition TensorEvaluator.h:861
TensorEvaluator< constThenArgType, Device >::TensorBlock ThenArgTensorBlock
Definition TensorEvaluator.h:859
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:918
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorEvaluator.h:854
EIGEN_DEVICE_FUNC const Dimensions & dimensions() const
Definition TensorEvaluator.h:882
TensorEvaluator< IfArgType, Device >::Dimensions Dimensions
Definition TensorEvaluator.h:846
internal::TensorBlockDescriptor< NumDims, Index > TensorBlockDesc
Definition TensorEvaluator.h:853
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorEvaluator.h:939
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorEvaluator.h:847
TensorSelectOp< IfArgType, ThenArgType, ElseArgType > XprType
Definition TensorEvaluator.h:811
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType)
Definition TensorEvaluator.h:888
internal::traits< XprType >::Scalar CoeffReturnType
Definition TensorEvaluator.h:843
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:844
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:907
internal::TensorTernaryExprBlock< TensorSelectOpBlockFactory, IfArgTensorBlock, ThenArgTensorBlock, ElseArgTensorBlock > TensorBlock
Definition TensorEvaluator.h:879
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EvaluatorPointerType data() const
Definition TensorEvaluator.h:964
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition TensorEvaluator.h:29
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType dest)
Definition TensorEvaluator.h:75
Derived::Scalar Scalar
Definition TensorEvaluator.h:31
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType & coeffRef(Index index)
Definition TensorEvaluator.h:99
EIGEN_STRONG_INLINE TensorEvaluator(const Derived &m, const Device &device)
Definition TensorEvaluator.h:66
const Device EIGEN_DEVICE_REF m_device
Definition TensorEvaluator.h:192
static const int NumCoords
Definition TensorEvaluator.h:42
internal::TensorBlockScratchAllocator< Device > TensorBlockScratch
Definition TensorEvaluator.h:59
Storage::Type EvaluatorPointerType
Definition TensorEvaluator.h:39
internal::TensorBlockDescriptor< NumCoords, Index > TensorBlockDesc
Definition TensorEvaluator.h:58
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
Definition TensorEvaluator.h:73
Dimensions m_dims
Definition TensorEvaluator.h:191
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorEvaluator.h:33
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:181
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType & coeffRef(const array< DenseIndex, NumCoords > &coords)
Definition TensorEvaluator.h:138
Derived::Scalar CoeffReturnType
Definition TensorEvaluator.h:32
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition TensorEvaluator.h:94
EIGEN_STRONG_INLINE void cleanup()
Definition TensorEvaluator.h:92
internal::traits< Derived >::template MakePointer< Scalar >::Type TensorPointerType
Definition TensorEvaluator.h:37
Derived XprType
Definition TensorEvaluator.h:35
@ 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
Derived::Index Index
Definition TensorEvaluator.h:30
internal::TensorMaterializedBlock< ScalarNoConst, NumCoords, Layout, Index > TensorBlock
Definition TensorEvaluator.h:63
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::enable_if< internal::unpacket_traits< PacketReturnTypeT >::masked_load_available, PacketReturnTypeT >::type partialPacket(Index index, typename internal::unpacket_traits< PacketReturnTypeT >::mask_t umask) const
Definition TensorEvaluator.h:117
StorageMemory< Scalar, Device > Storage
Definition TensorEvaluator.h:38
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE internal::TensorBlockResourceRequirements getResourceRequirements() const
Definition TensorEvaluator.h:153
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writePacket(Index index, const PacketReturnType &x)
Definition TensorEvaluator.h:123
Derived::Dimensions Dimensions
Definition TensorEvaluator.h:34
EvaluatorPointerType m_data
Definition TensorEvaluator.h:190
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writeBlock(const TensorBlockDesc &desc, const TensorBlock &block)
Definition TensorEvaluator.h:165
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(const array< DenseIndex, NumCoords > &coords) const
Definition TensorEvaluator.h:128
static const int PacketSize
Definition TensorEvaluator.h:36
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorEvaluator.h:147
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlock block(TensorBlockDesc &desc, TensorBlockScratch &scratch, bool=false) const
Definition TensorEvaluator.h:158
internal::remove_const< Scalar >::type ScalarNoConst
Definition TensorEvaluator.h:55
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorEvaluator.h:105
numext::uint16_t x
Definition Half.h:104
Definition TensorBlock.h:75
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockResourceRequirements any()
Definition TensorBlock.h:155
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorBlockResourceRequirements merge(const TensorBlockResourceRequirements &lhs, const TensorBlockResourceRequirements &rhs)
Definition TensorBlock.h:138
Definition XprHelper.h:176
Definition ForwardDeclarations.h:17
Definition GenericPacketMath.h:133