10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_MAP_H
11 #define EIGEN_CXX11_TENSOR_TENSOR_MAP_H
32 template <
typename PlainObjectType,
int Options_,
template <
class>
class MakePointer_>
71 static constexpr
int Layout = PlainObjectType::Layout;
79 template <
typename... IndexTypes>
81 IndexTypes... otherDimensions)
85 YOU_MADE_A_PROGRAMMING_MISTAKE)
92 template <
typename Dimensions>
108 if (PlainObjectType::Options &
RowMajor) {
127 template <
typename... IndexTypes>
129 IndexTypes... otherIndices)
const {
132 if (PlainObjectType::Options &
RowMajor) {
145 if (PlainObjectType::Options &
RowMajor) {
164 template <
typename... IndexTypes>
166 IndexTypes... otherIndices) {
168 "Number of indices used to access a tensor coefficient must be equal to the rank of the tensor.");
170 const std::size_t NumDims =
sizeof...(otherIndices) + 2;
171 if (PlainObjectType::Options &
RowMajor) {
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
#define eigen_internal_assert(x)
Definition: Macros.h:916
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define eigen_assert(x)
Definition: Macros.h:910
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
#define EIGEN_STATIC_ASSERT(X, MSG)
Definition: StaticAssert.h:26
#define EIGEN_TENSOR_INHERIT_ASSIGNMENT_OPERATORS(Derived)
Macro to manually inherit assignment operators. This is necessary, because the implicitly defined ass...
Definition: TensorMacros.h:81
The tensor base class.
Definition: TensorBase.h:1026
A tensor expression mapping an existing array of data.
Definition: TensorMap.h:33
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
Definition: TensorMap.h:99
PlainObjectType::Dimensions Dimensions
Definition: TensorMap.h:69
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, Index firstDimension, IndexTypes... otherDimensions)
Definition: TensorMap.h:80
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(const array< Index, NumIndices > &indices)
Definition: TensorMap.h:143
std::conditional_t< bool(internal::is_lvalue< PlainObjectType >::value), Scalar &, const Scalar & > StorageRefType
Definition: TensorMap.h:64
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(PlainObjectType &tensor)
Definition: TensorMap.h:96
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices) const
Definition: TensorMap.h:128
Eigen::internal::nested< Self >::type Nested
Definition: TensorMap.h:40
MakePointer_< Scalar >::ConstType PointerConstType
Definition: TensorMap.h:49
MakePointer_< Scalar >::Type PointerType
Definition: TensorMap.h:48
std::conditional_t< bool(internal::is_lvalue< PlainObjectType >::value), PointerType, PointerConstType > StoragePointerType
Definition: TensorMap.h:59
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(const array< Index, NumIndices > &indices) const
Definition: TensorMap.h:106
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType data() const
Definition: TensorMap.h:104
@ CoordAccess
Definition: TensorMap.h:72
@ RawAccess
Definition: TensorMap.h:72
@ IsAligned
Definition: TensorMap.h:72
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
Definition: TensorMap.h:102
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType data()
Definition: TensorMap.h:103
StoragePointerType m_data
Definition: TensorMap.h:185
static constexpr Index NumIndices
Definition: TensorMap.h:68
Dimensions m_dimensions
Definition: TensorMap.h:186
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(Index firstIndex, Index secondIndex, IndexTypes... otherIndices)
Definition: TensorMap.h:165
TensorMap< PlainObjectType, Options_, MakePointer_ > Self
Definition: TensorMap.h:35
internal::traits< PlainObjectType >::StorageKind StorageKind
Definition: TensorMap.h:42
internal::traits< PlainObjectType >::Scalar Scalar
Definition: TensorMap.h:44
static constexpr int Options
Definition: TensorMap.h:66
PlainObjectType::Base::CoeffReturnType CoeffReturnType
Definition: TensorMap.h:46
TensorBase< TensorMap< PlainObjectType, Options_, MakePointer_ > > Base
Definition: TensorMap.h:36
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()() const
Definition: TensorMap.h:117
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr)
Definition: TensorMap.h:74
NumTraits< Scalar >::Real RealScalar
Definition: TensorMap.h:45
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()()
Definition: TensorMap.h:154
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(Index index)
Definition: TensorMap.h:159
internal::traits< PlainObjectType >::Index Index
Definition: TensorMap.h:43
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator()(Index index) const
Definition: TensorMap.h:122
static constexpr int Layout
Definition: TensorMap.h:71
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, const array< Index, NumIndices > &dimensions)
Definition: TensorMap.h:88
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
Definition: TensorMap.h:101
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(Index n) const
Definition: TensorMap.h:100
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap(StoragePointerType dataPtr, const Dimensions &dimensions)
Definition: TensorMap.h:93
@ Aligned
Definition: Constants.h:242
@ RowMajor
Definition: Constants.h:320
EIGEN_DEVICE_FUNC bool all()
Definition: Macros.h:1276
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
std::array< T, N > array
Definition: EmulateArray.h:231
const int Dynamic
Definition: Constants.h:25
type
Definition: compute_granudrum_aor.py:141
Type
Type of JSON value.
Definition: rapidjson.h:513
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:217
Definition: XprHelper.h:819
ref_selector< T >::type type
Definition: TensorTraits.h:153
Definition: ForwardDeclarations.h:21