Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > Class Template Reference

The fixed sized version of the tensor class. More...

#include <TensorFixedSize.h>

+ Inheritance diagram for Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >:

Public Types

enum  {
  IsAligned = bool(EIGEN_MAX_ALIGN_BYTES > 0) , PacketAccess = (internal::packet_traits<Scalar>::size > 1) , BlockAccess = false , PreferBlockAccess = false ,
  CoordAccess = true , RawAccess = true
}
 
typedef TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > Self
 
typedef TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > Base
 
typedef Eigen::internal::nested< Self >::type Nested
 
typedef internal::traits< Self >::StorageKind StorageKind
 
typedef internal::traits< Self >::Index Index
 
typedef Scalar_ Scalar
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef Base::CoeffReturnType CoeffReturnType
 
typedef internal::TensorBlockNotImplemented TensorBlock
 
typedef Dimensions_ Dimensions
 
- Public Types inherited from Eigen::TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > >
typedef TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, ReadOnlyAccessors > Base
 
typedef internal::traits< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > DerivedTraits
 
typedef DerivedTraits::Scalar Scalar
 
typedef DerivedTraits::Index Index
 
typedef Scalar CoeffReturnType
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension (std::size_t n) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions dimensions () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalardata ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalardata () const
 
Selfbase ()
 
const Selfbase () const
 
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff (Index firstIndex, IndexTypes... otherIndices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff (const array< Index, NumIndices > &indices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff (Index index) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalarcoeff () const
 
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef (Index firstIndex, IndexTypes... otherIndices)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef (const array< Index, NumIndices > &indices)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef (Index index)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ScalarcoeffRef ()
 
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalaroperator() (Index firstIndex, IndexTypes... otherIndices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalaroperator() (const array< Index, NumIndices > &indices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalaroperator() (Index index) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalaroperator() () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalaroperator[] (Index index) const
 
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index firstIndex, IndexTypes... otherIndices)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (const array< Index, NumIndices > &indices)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index index)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator[] (Index index)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize (const Self &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize (Self &&other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize (const TensorBase< OtherDerived, ReadOnlyAccessors > &other)
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize (const TensorBase< OtherDerived, WriteAccessors > &other)
 
- Public Member Functions inherited from Eigen::TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & setZero ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & setConstant (const Scalar &val)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & setRandom ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & setRandom ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & setValues (const typename internal::Initializer< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, NumDimensions >::InitList &vals)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & operator+= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & operator-= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & operator*= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & operator/= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorLayoutSwapOp< const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > swap_layout () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorLayoutSwapOp< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > swap_layout ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorConcatenationOp< const Axis, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, const OtherDerived > concatenate (const OtherDerived &other, const Axis &axis) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorConcatenationOp< const Axis, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, OtherDerived > concatenate (const OtherDerived &other, const Axis &axis)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReshapingOp< const NewDimensions, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > reshape (const NewDimensions &newDimensions) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReshapingOp< const NewDimensions, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > reshape (const NewDimensions &newDimensions)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorSlicingOp< const StartIndices, const Sizes, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > slice (const StartIndices &startIndices, const Sizes &sizes) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorSlicingOp< const StartIndices, const Sizes, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > slice (const StartIndices &startIndices, const Sizes &sizes)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > stridedSlice (const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingSlicingOp< const StartIndices, const StopIndices, const Strides, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > stridedSlice (const StartIndices &startIndices, const StopIndices &stopIndices, const Strides &strides)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< DimId, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > chip (const Index offset) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< DimId, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > chip (const Index offset)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorChippingOp< Dynamic, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > chip (const Index offset, const Index dim) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorChippingOp< Dynamic, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > chip (const Index offset, const Index dim)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorReverseOp< const ReverseDimensions, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > reverse (const ReverseDimensions &rev) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorReverseOp< const ReverseDimensions, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > reverse (const ReverseDimensions &rev)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorRollOp< const Rolls, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > roll (const Rolls &roll) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorRollOp< const Rolls, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > roll (const Rolls &roll)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorShufflingOp< const Shuffle, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > shuffle (const Shuffle &shfl) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorShufflingOp< const Shuffle, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > shuffle (const Shuffle &shfl)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorStridingOp< const Strides, const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > stride (const Strides &strides) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorStridingOp< const Strides, TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > stride (const Strides &strides)
 
TensorDevice< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, DeviceType > device (const DeviceType &dev)
 
TensorAsyncDevice< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >, DeviceType, DoneCallback > device (const DeviceType &dev, DoneCallback done)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & derived ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & derived () const
 

Static Public Attributes

static constexpr int Options = Options_
 
static constexpr int Layout = Options_ & RowMajor ? RowMajor : ColMajor
 
static constexpr std::size_t NumIndices = Dimensions::count
 
- Static Public Attributes inherited from Eigen::TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > >
static constexpr int NumDimensions
 

Protected Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool checkIndexRange (const array< Index, NumIndices > &) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index linearizedIndex (const array< Index, NumIndices > &indices) const
 
- Protected Member Functions inherited from Eigen::TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > & operator= (const OtherDerived &other)
 

Protected Attributes

TensorStorage< Scalar, Dimensions, Optionsm_storage
 

Detailed Description

template<typename Scalar_, typename Dimensions_, int Options_, typename IndexType>
class Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >

The fixed sized version of the tensor class.

The fixed sized equivalent of Eigen::Tensor<float, 3> t(3, 5, 7); is Eigen::TensorFixedSize<float, Sizes<3,5,7>> t;

Member Typedef Documentation

◆ Base

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef TensorBase<TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> > Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Base

◆ CoeffReturnType

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef Base::CoeffReturnType Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::CoeffReturnType

◆ Dimensions

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef Dimensions_ Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Dimensions

◆ Index

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef internal::traits<Self>::Index Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Index

◆ Nested

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef Eigen::internal::nested<Self>::type Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Nested

◆ RealScalar

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef NumTraits<Scalar>::Real Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::RealScalar

◆ Scalar

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef Scalar_ Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Scalar

◆ Self

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef TensorFixedSize<Scalar_, Dimensions_, Options_, IndexType> Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Self

◆ StorageKind

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef internal::traits<Self>::StorageKind Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::StorageKind

◆ TensorBlock

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
typedef internal::TensorBlockNotImplemented Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorBlock

Member Enumeration Documentation

◆ anonymous enum

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
anonymous enum
Enumerator
IsAligned 
PacketAccess 
BlockAccess 
PreferBlockAccess 
CoordAccess 
RawAccess 
44  {
47  BlockAccess = false,
48  PreferBlockAccess = false,
49  CoordAccess = true,
50  RawAccess = true
51  };
#define EIGEN_MAX_ALIGN_BYTES
Definition: ConfigureVectorization.h:163
@ BlockAccess
Definition: TensorFixedSize.h:47
@ PreferBlockAccess
Definition: TensorFixedSize.h:48
@ RawAccess
Definition: TensorFixedSize.h:50
@ IsAligned
Definition: TensorFixedSize.h:45
@ PacketAccess
Definition: TensorFixedSize.h:46
@ CoordAccess
Definition: TensorFixedSize.h:49
@ size
Definition: GenericPacketMath.h:113

Constructor & Destructor Documentation

◆ TensorFixedSize() [1/5]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize ( )
inline
177 : m_storage() {}
TensorStorage< Scalar, Dimensions, Options > m_storage
Definition: TensorFixedSize.h:61

◆ TensorFixedSize() [2/5]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize ( const Self other)
inline
179 : Base(other), m_storage(other.m_storage) {}
TensorBase< TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType > > Base
Definition: TensorFixedSize.h:33

◆ TensorFixedSize() [3/5]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize ( Self &&  other)
inline
181 : m_storage(other.m_storage) {}

◆ TensorFixedSize() [4/5]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize ( const TensorBase< OtherDerived, ReadOnlyAccessors > &  other)
inline
184  {
185  typedef TensorAssignOp<TensorFixedSize, const OtherDerived> Assign;
186  Assign assign(*this, other.derived());
188  }
static EIGEN_STRONG_INLINE void run(const Expression &expr, const Device &device=DefaultDevice())
Definition: TensorExecutor.h:92

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run().

◆ TensorFixedSize() [5/5]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::TensorFixedSize ( const TensorBase< OtherDerived, WriteAccessors > &  other)
inline
190  {
191  typedef TensorAssignOp<TensorFixedSize, const OtherDerived> Assign;
192  Assign assign(*this, other.derived());
194  }

References Eigen::TensorBase< Derived, AccessLevel >::derived(), and Eigen::internal::TensorExecutor< Expression, Device, Vectorizable, Tiling >::run().

Member Function Documentation

◆ base() [1/2]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
Self& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::base ( )
inline
74 { return *this; }

◆ base() [2/2]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
const Self& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::base ( ) const
inline
75 { return *this; }

◆ checkIndexRange()

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::checkIndexRange ( const array< Index, NumIndices > &  ) const
inlineprotected
201  {
204  using internal::greater_equal_zero_op;
205  using internal::lesser_op;
206  using internal::logical_and_op;
207 
208  return true;
209  // check whether the indices are all >= 0
210  /* array_apply_and_reduce<logical_and_op, greater_equal_zero_op>(indices) &&
211  // check whether the indices fit in the dimensions
212  array_zip_and_reduce<logical_and_op, lesser_op>(indices, m_storage.dimensions());*/
213  }
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()))
Definition: MoreMeta.h:536
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()))
Definition: MoreMeta.h:564

References Eigen::internal::array_apply_and_reduce(), and Eigen::internal::array_zip_and_reduce().

Referenced by Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff(), Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeffRef(), and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator()().

◆ coeff() [1/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff ( ) const
inline

◆ coeff() [2/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff ( const array< Index, NumIndices > &  indices) const
inline
84  {
86  return m_storage.data()[linearizedIndex(indices)];
87  }
#define eigen_internal_assert(x)
Definition: Macros.h:916
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool checkIndexRange(const array< Index, NumIndices > &) const
Definition: TensorFixedSize.h:201
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index linearizedIndex(const array< Index, NumIndices > &indices) const
Definition: TensorFixedSize.h:215

References Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::checkIndexRange(), Eigen::TensorStorage< T, FixedDimensions, Options_ >::data(), eigen_internal_assert, Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::linearizedIndex(), and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::m_storage.

◆ coeff() [3/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff ( Index  firstIndex,
IndexTypes...  otherIndices 
) const
inline
78  {
79  // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.
80  EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
81  return coeff(array<Index, NumIndices>{{firstIndex, otherIndices...}});
82  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & coeff() const
Definition: TensorFixedSize.h:94

References Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff(), EIGEN_STATIC_ASSERT, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices.

◆ coeff() [4/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff ( Index  index) const
inline

◆ coeffRef() [1/4]

◆ coeffRef() [2/4]

◆ coeffRef() [3/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeffRef ( Index  firstIndex,
IndexTypes...  otherIndices 
)
inline
100  {
101  // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.
102  EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
103  return coeffRef(array<Index, NumIndices>{{firstIndex, otherIndices...}});
104  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar & coeffRef()
Definition: TensorFixedSize.h:116

References Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeffRef(), EIGEN_STATIC_ASSERT, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices.

◆ coeffRef() [4/4]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeffRef ( Index  index)
inline

◆ data() [1/2]

◆ data() [2/2]

◆ dimension()

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::dimension ( std::size_t  n) const
inline
65 { return m_storage.dimensions()[n]; }
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const FixedDimensions dimensions() const
Definition: TensorStorage.h:56

References Eigen::TensorStorage< T, FixedDimensions, Options_ >::dimensions(), Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::m_storage, and n.

◆ dimensions()

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Dimensions Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::dimensions ( ) const
inline

◆ linearizedIndex()

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::linearizedIndex ( const array< Index, NumIndices > &  indices) const
inlineprotected

◆ operator()() [1/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( )
inline

◆ operator()() [2/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( ) const
inline

◆ operator()() [3/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( const array< Index, NumIndices > &  indices)
inline

◆ operator()() [4/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( const array< Index, NumIndices > &  indices) const
inline

◆ operator()() [5/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( Index  firstIndex,
IndexTypes...  otherIndices 
)
inline
150  {
151  // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.
152  EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
153  return operator()(array<Index, NumIndices>{{firstIndex, otherIndices...}});
154  }
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar & operator()() const
Definition: TensorFixedSize.h:138

References EIGEN_STATIC_ASSERT, Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator()().

◆ operator()() [6/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
template<typename... IndexTypes>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( Index  firstIndex,
IndexTypes...  otherIndices 
) const
inline
122  {
123  // The number of indices used to access a tensor coefficient must be equal to the rank of the tensor.
124  EIGEN_STATIC_ASSERT(sizeof...(otherIndices) + 1 == NumIndices, YOU_MADE_A_PROGRAMMING_MISTAKE)
125  return this->operator()(array<Index, NumIndices>{{firstIndex, otherIndices...}});
126  }

References EIGEN_STATIC_ASSERT, Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator()().

◆ operator()() [7/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( Index  index)
inline

◆ operator()() [8/8]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator() ( Index  index) const
inline

◆ operator[]() [1/2]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator[] ( Index  index)
inline
171  {
172  // The bracket operator is only for vectors, use the parenthesis operator instead
173  EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE)
174  return coeffRef(index);
175  }

References Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeffRef(), EIGEN_STATIC_ASSERT, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices.

◆ operator[]() [2/2]

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar& Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::operator[] ( Index  index) const
inline
143  {
144  // The bracket operator is only for vectors, use the parenthesis operator instead.
145  EIGEN_STATIC_ASSERT(NumIndices == 1, YOU_MADE_A_PROGRAMMING_MISTAKE);
146  return coeff(index);
147  }

References Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::coeff(), EIGEN_STATIC_ASSERT, and Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::NumIndices.

◆ rank()

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::rank ( ) const
inline

◆ size()

Member Data Documentation

◆ Layout

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
constexpr int Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Layout = Options_ & RowMajor ? RowMajor : ColMajor
staticconstexpr

◆ m_storage

◆ NumIndices

◆ Options

template<typename Scalar_ , typename Dimensions_ , int Options_, typename IndexType >
constexpr int Eigen::TensorFixedSize< Scalar_, Dimensions_, Options_, IndexType >::Options = Options_
staticconstexpr

The documentation for this class was generated from the following file: