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 PlainObjectType::Base Base
 
typedef Base::CoeffReturnType CoeffReturnType
 
typedef PlainObjectType::Dimensions Dimensions
 
typedef internal::traits< PlainObjectType >::Index Index
 
typedef Eigen::internal::nested< Self >::type Nested
 
typedef PointerType PointerArgType
 
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
 

Public Member Functions

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PointerType data ()
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE PointerType 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 Scalaroperator() ()
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() () const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (const array< Index, NumIndices > &indices)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (const array< Index, NumIndices > &indices) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2, Index i3)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2, Index i3) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2, Index i3, Index i4)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (Index i0, Index i1, Index i2, Index i3, Index i4) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalaroperator() (Index index)
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalaroperator() (Index index) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Selfoperator= (const OtherDerived &other)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Selfoperator= (const Self &other)
 
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 (PointerArgType dataPtr)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, const array< Index, NumIndices > &dimensions)
 
template<typename Dimensions >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, const Dimensions &dimensions)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, Index dim1, Index dim2)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, Index dim1, Index dim2, Index dim3)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, Index dim1, Index dim2, Index dim3, Index dim4, Index dim5)
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE TensorMap (PointerArgType dataPtr, Index firstDimension)
 

Static Public Attributes

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

Private Attributes

MakePointer_< Scalar >::Type 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 25 of file TensorForwardDeclarations.h.

Member Typedef Documentation

◆ Base

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

Definition at line 33 of file TensorMap.h.

◆ CoeffReturnType

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

Definition at line 39 of file TensorMap.h.

◆ Dimensions

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

Definition at line 52 of file TensorMap.h.

◆ Index

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

Definition at line 36 of file TensorMap.h.

◆ Nested

Definition at line 34 of file TensorMap.h.

◆ PointerArgType

Definition at line 47 of file TensorMap.h.

◆ PointerType

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

Definition at line 46 of file TensorMap.h.

◆ RealScalar

Definition at line 38 of file TensorMap.h.

◆ Scalar

Definition at line 37 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 35 of file TensorMap.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IsAligned 
Layout 
CoordAccess 
RawAccess 

Definition at line 54 of file TensorMap.h.

Constructor & Destructor Documentation

◆ TensorMap() [1/9]

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

Definition at line 62 of file TensorMap.h.

◆ TensorMap() [2/9]

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

Definition at line 75 of file TensorMap.h.

◆ TensorMap() [3/9]

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

Definition at line 80 of file TensorMap.h.

◆ TensorMap() [4/9]

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

Definition at line 84 of file TensorMap.h.

◆ TensorMap() [5/9]

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

Definition at line 88 of file TensorMap.h.

◆ TensorMap() [6/9]

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

Definition at line 92 of file TensorMap.h.

◆ TensorMap() [7/9]

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

Definition at line 97 of file TensorMap.h.

◆ TensorMap() [8/9]

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

Definition at line 102 of file TensorMap.h.

◆ TensorMap() [9/9]

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

Definition at line 106 of file TensorMap.h.

Member Function Documentation

◆ data() [1/2]

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

Definition at line 119 of file TensorMap.h.

◆ data() [2/2]

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

Definition at line 121 of file TensorMap.h.

◆ dimension()

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

Definition at line 113 of file TensorMap.h.

◆ dimensions()

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

Definition at line 115 of file TensorMap.h.

◆ operator()() [1/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorMap::operator() ( )
inline

Definition at line 224 of file TensorMap.h.

◆ operator()() [2/14]

EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar& Eigen::TensorMap::operator() ( ) const
inline

Definition at line 137 of file TensorMap.h.

◆ operator()() [3/14]

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

Definition at line 211 of file TensorMap.h.

◆ operator()() [4/14]

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

Definition at line 124 of file TensorMap.h.

◆ operator()() [5/14]

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

Definition at line 253 of file TensorMap.h.

◆ operator()() [6/14]

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

Definition at line 165 of file TensorMap.h.

◆ operator()() [7/14]

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

Definition at line 264 of file TensorMap.h.

◆ operator()() [8/14]

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

Definition at line 176 of file TensorMap.h.

◆ operator()() [9/14]

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

Definition at line 275 of file TensorMap.h.

◆ operator()() [10/14]

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

Definition at line 187 of file TensorMap.h.

◆ operator()() [11/14]

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

Definition at line 286 of file TensorMap.h.

◆ operator()() [12/14]

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

Definition at line 198 of file TensorMap.h.

◆ operator()() [13/14]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar& Eigen::TensorMap::operator() ( Index  index)
inline

Definition at line 231 of file TensorMap.h.

◆ operator()() [14/14]

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

Definition at line 144 of file TensorMap.h.

◆ operator=() [1/2]

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Self& Eigen::TensorMap::operator= ( const OtherDerived &  other)
inline

Definition at line 308 of file TensorMap.h.

◆ operator=() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Self& Eigen::TensorMap::operator= ( const Self other)
inline

Definition at line 298 of file TensorMap.h.

◆ rank()

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

Definition at line 111 of file TensorMap.h.

◆ size()

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

Definition at line 117 of file TensorMap.h.

Member Data Documentation

◆ m_data

MakePointer_<Scalar>::Type Eigen::TensorMap::m_data
private

Definition at line 317 of file TensorMap.h.

◆ m_dimensions

Dimensions Eigen::TensorMap::m_dimensions
private

Definition at line 318 of file TensorMap.h.

◆ NumIndices

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

Definition at line 51 of file TensorMap.h.

◆ Options

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

Definition at line 49 of file TensorMap.h.


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


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:07:46