10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H 38 template<
typename XprType>
41 typedef typename XprType::Scalar Scalar;
43 typedef typename XprTraits::StorageKind StorageKind;
44 typedef typename XprTraits::Index
Index;
45 typedef typename XprType::Nested Nested;
51 template<
typename XprType>
57 template<
typename XprType>
67 template<
typename XprType>
83 expression()
const {
return m_xpr; }
86 EIGEN_STRONG_INLINE TensorLayoutSwapOp& operator = (
const TensorLayoutSwapOp& other)
89 Assign assign(*
this, other);
94 template<
typename OtherDerived>
96 EIGEN_STRONG_INLINE TensorLayoutSwapOp& operator = (
const OtherDerived& other)
99 Assign assign(*
this, other);
105 typename XprType::Nested m_xpr;
110 template<
typename ArgType,
typename Device>
114 typedef typename XprType::Index
Index;
126 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
TensorEvaluator(
const XprType& op,
const Device& device)
127 : m_impl(op.expression(), device)
129 for(
int i = 0; i < NumDims; ++i) {
130 m_dimensions[i] = m_impl.dimensions()[NumDims-1-i];
134 typedef typename XprType::Scalar Scalar;
138 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const Dimensions& dimensions()
const {
return m_dimensions; }
140 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
bool evalSubExprsIfNeeded(CoeffReturnType* data) {
141 return m_impl.evalSubExprsIfNeeded(data);
143 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
void cleanup() {
147 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType coeff(Index index)
const 149 return m_impl.coeff(index);
152 template<
int LoadMode>
153 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PacketReturnType packet(Index index)
const 155 return m_impl.template packet<LoadMode>(index);
158 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
TensorOpCost costPerCoeff(
bool vectorized)
const {
159 return m_impl.costPerCoeff(vectorized);
162 EIGEN_DEVICE_FUNC Scalar* data()
const {
return m_impl.data(); }
168 Dimensions m_dimensions;
173 template<
typename ArgType,
typename Device>
187 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
TensorEvaluator(
const XprType& op,
const Device& device)
191 typedef typename XprType::Index
Index;
192 typedef typename XprType::Scalar Scalar;
196 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE CoeffReturnType& coeffRef(Index index)
198 return this->m_impl.coeffRef(index);
200 template <
int StoreMode> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
201 void writePacket(Index index,
const PacketReturnType& x)
203 this->m_impl.template writePacket<StoreMode>(index, x);
209 #endif // EIGEN_CXX11_TENSOR_TENSOR_LAYOUT_SWAP_H Definition: TensorExecutor.h:27
Definition: TensorCostModel.h:25
Storage order is column major (see TopicStorageOrders).
Definition: Constants.h:320
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
A cost model used to limit the number of threads used for evaluating tensor expression.
Definition: TensorEvaluator.h:28
Definition: TensorAssign.h:60
Definition: TensorLayoutSwap.h:111
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Definition: TensorDeviceDefault.h:17
The tensor base class.
Definition: TensorBase.h:827
Definition: BandTriangularSolver.h:13
Storage order is row major (see TopicStorageOrders).
Definition: Constants.h:322
Definition: TensorTraits.h:170
The type used to identify a dense storage.
Definition: Constants.h:491
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:312
Definition: EmulateArray.h:203
Definition: TensorForwardDeclarations.h:50