Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Eigen::TensorMap Class Reference

A tensor expression mapping an existing array of data. More...

#include <TensorForwardDeclarations.h>

Public Types

enum  { IsAligned = ((int(Options_)&Aligned)==Aligned), Layout = PlainObjectType::Layout, CoordAccess = true, RawAccess = true }
 
typedef TensorBase< TensorMap< PlainObjectType, Options_, MakePointer_ > > Base
 
typedef PlainObjectType::Base::CoeffReturnType CoeffReturnType
 
typedef PlainObjectType::Dimensions Dimensions
 
typedef internal::traits< PlainObjectType >::Index Index
 
typedef Eigen::internal::nested< Self >::type Nested
 
typedef MakePointer_< Scalar >::ConstType PointerConstType
 
typedef MakePointer_< Scalar >::Type PointerType
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef internal::traits< PlainObjectType >::Scalar Scalar
 
typedef TensorMap< PlainObjectType, Options_, MakePointer_ > Self
 
typedef internal::traits< PlainObjectType >::StorageKind StorageKind
 
typedef internal::conditional< bool(internal::is_lvalue< PlainObjectType >::value), PointerType, PointerConstType >::type StoragePointerType
 
typedef internal::conditional< bool(internal::is_lvalue< PlainObjectType >::value), Scalar &, const Scalar & >::type StorageRefType
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType data ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType data () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index dimension (Index n) const
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensionsdimensions () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() ()
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (const array< Index, NumIndices > &indices)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (const array< Index, NumIndices > &indices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2, Index i3)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2, Index i3) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2, Index i3, Index i4)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index i0, Index i1, Index i2, Index i3, Index i4) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index index)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType operator() (Index index) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index rank () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index size () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PlainObjectType &tensor)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, const array< Index, NumIndices > &dimensions)
 
template<typename Dimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, const Dimensions &dimensions)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, Index dim1, Index dim2)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4, Index dim5)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (StoragePointerType dataPtr, Index firstDimension)
 

Static Public Attributes

static const Index NumIndices = PlainObjectType::NumIndices
 
static const int Options = Options_
 

Private Attributes

StoragePointerType m_data
 
Dimensions m_dimensions
 

Detailed Description

A tensor expression mapping an existing array of data.

template <class> class MakePointer_ is added to convert the host pointer to the device pointer. It is added due to the fact that for our device compiler T* is not allowed. If we wanted to use the same Evaluator functions we have to convert that type to our pointer T. This is done through our MakePointer_ class. By default the Type in the MakePointer_<T> is T* . Therefore, by adding the default value, we managed to convert the type and it does not break any existing code as its default value is T*.

Definition at line 52 of file TensorForwardDeclarations.h.

Member Typedef Documentation

◆ Base

typedef TensorBase<TensorMap<PlainObjectType, Options_, MakePointer_> > Eigen::TensorMap::Base

Definition at line 33 of file TensorMap.h.

◆ CoeffReturnType

typedef PlainObjectType::Base::CoeffReturnType Eigen::TensorMap::CoeffReturnType

Definition at line 43 of file TensorMap.h.

◆ Dimensions

typedef PlainObjectType::Dimensions Eigen::TensorMap::Dimensions

Definition at line 70 of file TensorMap.h.

◆ Index

typedef internal::traits<PlainObjectType>::Index Eigen::TensorMap::Index

Definition at line 40 of file TensorMap.h.

◆ Nested

Definition at line 37 of file TensorMap.h.

◆ PointerConstType

typedef MakePointer_<Scalar>::ConstType Eigen::TensorMap::PointerConstType

Definition at line 46 of file TensorMap.h.

◆ PointerType

typedef MakePointer_<Scalar>::Type Eigen::TensorMap::PointerType

Definition at line 45 of file TensorMap.h.

◆ RealScalar

Definition at line 42 of file TensorMap.h.

◆ Scalar

Definition at line 41 of file TensorMap.h.

◆ Self

typedef TensorMap<PlainObjectType, Options_, MakePointer_> Eigen::TensorMap::Self

Definition at line 32 of file TensorMap.h.

◆ StorageKind

Definition at line 39 of file TensorMap.h.

◆ StoragePointerType

Definition at line 56 of file TensorMap.h.

◆ StorageRefType

typedef internal::conditional< bool(internal::is_lvalue<PlainObjectType>::value), Scalar&, const Scalar& >::type Eigen::TensorMap::StorageRefType

Definition at line 65 of file TensorMap.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IsAligned 
Layout 
CoordAccess 
RawAccess 

Definition at line 72 of file TensorMap.h.

Constructor & Destructor Documentation

◆ TensorMap() [1/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr)
inline

Definition at line 80 of file TensorMap.h.

◆ TensorMap() [2/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
Index  firstDimension 
)
inline

Definition at line 93 of file TensorMap.h.

◆ TensorMap() [3/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
Index  dim1,
Index  dim2 
)
inline

Definition at line 98 of file TensorMap.h.

◆ TensorMap() [4/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
Index  dim1,
Index  dim2,
Index  dim3 
)
inline

Definition at line 102 of file TensorMap.h.

◆ TensorMap() [5/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
Index  dim1,
Index  dim2,
Index  dim3,
Index  dim4 
)
inline

Definition at line 106 of file TensorMap.h.

◆ TensorMap() [6/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
Index  dim1,
Index  dim2,
Index  dim3,
Index  dim4,
Index  dim5 
)
inline

Definition at line 110 of file TensorMap.h.

◆ TensorMap() [7/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
const array< Index, NumIndices > &  dimensions 
)
inline

Definition at line 115 of file TensorMap.h.

◆ TensorMap() [8/9]

template<typename Dimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( StoragePointerType  dataPtr,
const Dimensions dimensions 
)
inline

Definition at line 120 of file TensorMap.h.

◆ TensorMap() [9/9]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Eigen::TensorMap::TensorMap ( PlainObjectType &  tensor)
inline

Definition at line 124 of file TensorMap.h.

Member Function Documentation

◆ data() [1/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType Eigen::TensorMap::data ( )
inline

Definition at line 137 of file TensorMap.h.

◆ data() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StoragePointerType Eigen::TensorMap::data ( ) const
inline

Definition at line 139 of file TensorMap.h.

◆ dimension()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorMap::dimension ( Index  n) const
inline

Definition at line 131 of file TensorMap.h.

◆ dimensions()

EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Dimensions& Eigen::TensorMap::dimensions ( ) const
inline

Definition at line 133 of file TensorMap.h.

◆ operator()() [1/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( )
inline

Definition at line 243 of file TensorMap.h.

◆ operator()() [2/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( ) const
inline

Definition at line 155 of file TensorMap.h.

◆ operator()() [3/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( const array< Index, NumIndices > &  indices)
inline

Definition at line 230 of file TensorMap.h.

◆ operator()() [4/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( const array< Index, NumIndices > &  indices) const
inline

Definition at line 142 of file TensorMap.h.

◆ operator()() [5/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1 
)
inline

Definition at line 273 of file TensorMap.h.

◆ operator()() [6/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1 
) const
inline

Definition at line 184 of file TensorMap.h.

◆ operator()() [7/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2 
)
inline

Definition at line 284 of file TensorMap.h.

◆ operator()() [8/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2 
) const
inline

Definition at line 195 of file TensorMap.h.

◆ operator()() [9/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2,
Index  i3 
)
inline

Definition at line 295 of file TensorMap.h.

◆ operator()() [10/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2,
Index  i3 
) const
inline

Definition at line 206 of file TensorMap.h.

◆ operator()() [11/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2,
Index  i3,
Index  i4 
)
inline

Definition at line 306 of file TensorMap.h.

◆ operator()() [12/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  i0,
Index  i1,
Index  i2,
Index  i3,
Index  i4 
) const
inline

Definition at line 217 of file TensorMap.h.

◆ operator()() [13/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  index)
inline

Definition at line 250 of file TensorMap.h.

◆ operator()() [14/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE StorageRefType Eigen::TensorMap::operator() ( Index  index) const
inline

Definition at line 162 of file TensorMap.h.

◆ rank()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorMap::rank ( ) const
inline

Definition at line 129 of file TensorMap.h.

◆ size()

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Index Eigen::TensorMap::size ( ) const
inline

Definition at line 135 of file TensorMap.h.

Member Data Documentation

◆ m_data

StoragePointerType Eigen::TensorMap::m_data
private

Definition at line 321 of file TensorMap.h.

◆ m_dimensions

Dimensions Eigen::TensorMap::m_dimensions
private

Definition at line 322 of file TensorMap.h.

◆ NumIndices

const Index Eigen::TensorMap::NumIndices = PlainObjectType::NumIndices
static

Definition at line 69 of file TensorMap.h.

◆ Options

const int Eigen::TensorMap::Options = Options_
static

Definition at line 67 of file TensorMap.h.


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


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:47:36