10 #ifndef EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H 11 #define EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H 26 template<
typename Scalar_,
typename Dimensions_,
int Options_,
typename IndexType>
72 inline Self&
base() {
return *
this; }
73 inline const Self&
base()
const {
return *
this; }
75 #if EIGEN_HAS_VARIADIC_TEMPLATES 76 template<
typename... IndexTypes>
80 EIGEN_STATIC_ASSERT(
sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
96 return m_storage.
data()[index];
103 return m_storage.
data()[0];
107 #if EIGEN_HAS_VARIADIC_TEMPLATES 108 template<
typename... IndexTypes>
112 EIGEN_STATIC_ASSERT(
sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
128 return m_storage.
data()[index];
135 return m_storage.
data()[0];
138 #if EIGEN_HAS_VARIADIC_TEMPLATES 139 template<
typename... IndexTypes>
143 EIGEN_STATIC_ASSERT(
sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
151 const Index index = i1 + i0 * m_storage.
dimensions()[1];
152 return m_storage.
data()[index];
154 const Index index = i0 + i1 * m_storage.
dimensions()[0];
155 return m_storage.
data()[index];
163 return m_storage.
data()[index];
166 return m_storage.
data()[index];
174 return m_storage.
data()[index];
177 return m_storage.
data()[index];
185 return m_storage.
data()[index];
188 return m_storage.
data()[index];
198 return coeff(indices);
223 #if EIGEN_HAS_VARIADIC_TEMPLATES 224 template<
typename... IndexTypes>
228 EIGEN_STATIC_ASSERT(
sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
236 const Index index = i1 + i0 * m_storage.
dimensions()[1];
237 return m_storage.
data()[index];
239 const Index index = i0 + i1 * m_storage.
dimensions()[0];
240 return m_storage.
data()[index];
248 return m_storage.
data()[index];
251 return m_storage.
data()[index];
259 return m_storage.
data()[index];
262 return m_storage.
data()[index];
270 return m_storage.
data()[index];
273 return m_storage.
data()[index];
315 : m_storage(other.m_storage)
319 #if EIGEN_HAS_RVALUE_REFERENCES 326 template<
typename OtherDerived>
331 Assign assign(*
this, other.
derived());
334 template<
typename OtherDerived>
339 Assign assign(*
this, other.
derived());
369 return m_storage.
dimensions().IndexOfRowMajor(indices);
371 return m_storage.
dimensions().IndexOfColMajor(indices);
379 #endif // EIGEN_CXX11_TENSOR_TENSOR_FIXED_SIZE_H EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension(std::size_t n) const
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(Index i0, Index i1, Index i2, Index i3) const
constexpr EIGEN_STRONG_INLINE auto array_apply_and_reduce(array< A, N > a) -> decltype(h_array_apply_and_reduce< Reducer, Op, A, N >(a, typename gen_numeric_list< int, N >::type()))
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(const array< Index, NumIndices > &indices)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar * data()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions & dimensions() const
internal::TensorBlockNotImplemented TensorBlock
internal::traits< Self >::Index Index
Eigen::internal::nested< Self >::type Nested
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(const TensorBase< OtherDerived, WriteAccessors > &other)
Namespace containing all symbols from the Eigen library.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(Index i0, Index i1, Index i2, Index i3, Index i4) const
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool checkIndexRange(const array< Index, NumIndices > &) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(const array< Index, NumIndices > &indices) const
internal::traits< Self >::StorageKind StorageKind
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(Index i0, Index i1, Index i2) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Derived & derived()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar * data() const
constexpr EIGEN_STRONG_INLINE auto array_zip_and_reduce(array< A, N > a, array< B, N > b) -> decltype(h_array_zip_and_reduce< Reducer, Op, A, B, N >(a, b, typename gen_numeric_list< int, N >::type()))
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef()
TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > Base
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator[](Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(const TensorBase< OtherDerived, ReadOnlyAccessors > &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(Index i0, Index i1) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index index)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3, Index i4)
static const std::size_t NumIndices
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize(const Self &other)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(Index index)
The fixed sized version of the tensor class.
#define EIGEN_DEVICE_FUNC
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()(Index index) const
NumTraits< Scalar >::Real RealScalar
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const FixedDimensions & dimensions()
const Self & base() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(const array< Index, NumIndices > &indices) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff(Index index) const
TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > Self
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index linearizedIndex(const array< Index, NumIndices > &indices) const
TensorStorage< Scalar, Dimensions, Options > m_storage
#define eigen_internal_assert(x)
Generic expression where a coefficient-wise unary operator is applied to an expression.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()(Index i0, Index i1, Index i2, Index i3)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex size() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T * data()
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef(const array< Index, NumIndices > &indices)
#define EIGEN_TENSOR_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived)
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=Device())
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & operator()()
Base::CoeffReturnType CoeffReturnType
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator[](Index index) const