10#ifndef EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H
11#define EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H
38template<
typename XprType>
41 typedef typename XprType::Scalar
Scalar;
44 typedef typename XprTraits::Index
Index;
45 typedef typename XprType::Nested
Nested;
52template<
typename XprType>
58template<
typename XprType>
68template<
typename XprType>
94template<
typename ArgType,
typename Device>
117 : m_impl(op.expression(), device)
119 for(
int i = 0;
i < NumDims; ++
i) {
120 m_dimensions[
i] = m_impl.dimensions()[NumDims-1-
i];
140 return m_impl.evalSubExprsIfNeeded(
data);
148 return m_impl.coeff(index);
151 template<
int LoadMode>
154 return m_impl.template packet<LoadMode>(index);
158 return m_impl.costPerCoeff(vectorized);
174template<
typename ArgType,
typename Device>
205 return this->m_impl.coeffRef(index);
210 this->m_impl.template writePacket<StoreMode>(index,
x);
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_TENSOR_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Definition TensorMacros.h:94
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 TensorLayoutSwap.h:70
Eigen::internal::traits< TensorLayoutSwapOp >::Scalar Scalar
Definition TensorLayoutSwap.h:73
XprType::Nested m_xpr
Definition TensorLayoutSwap.h:89
internal::remove_const< typenameXprType::CoeffReturnType >::type CoeffReturnType
Definition TensorLayoutSwap.h:75
Eigen::internal::traits< TensorLayoutSwapOp >::StorageKind StorageKind
Definition TensorLayoutSwap.h:77
TensorBase< TensorLayoutSwapOp< XprType >, WriteAccessors > Base
Definition TensorLayoutSwap.h:72
EIGEN_DEVICE_FUNC const internal::remove_all< typenameXprType::Nested >::type & expression() const
Definition TensorLayoutSwap.h:85
Eigen::internal::nested< TensorLayoutSwapOp >::type Nested
Definition TensorLayoutSwap.h:76
Eigen::NumTraits< Scalar >::Real RealScalar
Definition TensorLayoutSwap.h:74
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp(const XprType &expr)
Definition TensorLayoutSwap.h:80
Eigen::internal::traits< TensorLayoutSwapOp >::Index Index
Definition TensorLayoutSwap.h:78
Definition TensorCostModel.h:25
Definition TensorBlock.h:617
Definition TensorRef.h:81
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
@ WriteAccessors
Definition Constants.h:378
@ ColMajor
Definition Constants.h:319
@ RowMajor
Definition Constants.h:321
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T * constCast(const T *data)
Definition TensorForwardDeclarations.h:27
Definition BandTriangularSolver.h:13
Definition TensorDimensions.h:263
Definition Constants.h:507
Definition TensorForwardDeclarations.h:37
internal::TensorBlockNotImplemented TensorBlock
Definition TensorLayoutSwap.h:191
EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition TensorLayoutSwap.h:194
XprType::Scalar Scalar
Definition TensorLayoutSwap.h:199
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorLayoutSwap.h:201
XprType::Index Index
Definition TensorLayoutSwap.h:198
TensorLayoutSwapOp< ArgType > XprType
Definition TensorLayoutSwap.h:179
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void writePacket(Index index, const PacketReturnType &x)
Definition TensorLayoutSwap.h:208
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType & coeffRef(Index index)
Definition TensorLayoutSwap.h:203
TensorEvaluator< const TensorLayoutSwapOp< ArgType >, Device > Base
Definition TensorLayoutSwap.h:178
XprType::CoeffReturnType CoeffReturnType
Definition TensorLayoutSwap.h:200
Definition TensorLayoutSwap.h:96
Dimensions m_dimensions
Definition TensorLayoutSwap.h:169
DSizes< Index, NumDims > Dimensions
Definition TensorLayoutSwap.h:100
EIGEN_STRONG_INLINE void cleanup()
Definition TensorLayoutSwap.h:142
EIGEN_STRONG_INLINE bool evalSubExprsIfNeeded(EvaluatorPointerType data)
Definition TensorLayoutSwap.h:139
EIGEN_STRONG_INLINE TensorEvaluator(const XprType &op, const Device &device)
Definition TensorLayoutSwap.h:116
TensorEvaluator< ArgType, Device > m_impl
Definition TensorLayoutSwap.h:168
XprType::Index Index
Definition TensorLayoutSwap.h:98
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index) const
Definition TensorLayoutSwap.h:152
internal::TensorBlockNotImplemented TensorBlock
Definition TensorLayoutSwap.h:113
Storage::Type EvaluatorPointerType
Definition TensorLayoutSwap.h:135
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorOpCost costPerCoeff(bool vectorized) const
Definition TensorLayoutSwap.h:157
XprType::CoeffReturnType CoeffReturnType
Definition TensorLayoutSwap.h:132
TensorLayoutSwapOp< ArgType > XprType
Definition TensorLayoutSwap.h:97
const TensorEvaluator< ArgType, Device > & impl() const
Definition TensorLayoutSwap.h:165
XprType::Scalar Scalar
Definition TensorLayoutSwap.h:131
EIGEN_DEVICE_FUNC Storage::Type data() const
Definition TensorLayoutSwap.h:161
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index) const
Definition TensorLayoutSwap.h:146
StorageMemory< CoeffReturnType, Device > Storage
Definition TensorLayoutSwap.h:134
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
Definition TensorLayoutSwap.h:137
PacketType< CoeffReturnType, Device >::type PacketReturnType
Definition TensorLayoutSwap.h:133
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition TensorEvaluator.h:29
EIGEN_DEVICE_FUNC EvaluatorPointerType data() const
Definition TensorEvaluator.h:181
@ 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
const TensorLayoutSwapOp< XprType > & type
Definition TensorLayoutSwap.h:55
Definition XprHelper.h:332
TensorLayoutSwapOp< XprType > type
Definition TensorLayoutSwap.h:61
Definition TensorTraits.h:175
XprTraits::StorageKind StorageKind
Definition TensorLayoutSwap.h:43
remove_reference< Nested >::type _Nested
Definition TensorLayoutSwap.h:46
XprTraits::PointerType PointerType
Definition TensorLayoutSwap.h:49
XprTraits::Index Index
Definition TensorLayoutSwap.h:44
XprType::Scalar Scalar
Definition TensorLayoutSwap.h:41
traits< XprType > XprTraits
Definition TensorLayoutSwap.h:42
XprType::Nested Nested
Definition TensorLayoutSwap.h:45
Definition ForwardDeclarations.h:17