17 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
18 struct traits<
Map<PlainObjectType, MapOptions, StrideType> >
19 :
public traits<PlainObjectType>
24 ? PlainObjectType::ColsAtCompileTime
25 : PlainObjectType::RowsAtCompileTime,
27 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
28 ?
int(PlainObjectType::InnerStrideAtCompileTime)
29 :
int(StrideType::InnerStrideAtCompileTime),
30 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
31 ? (InnerStrideAtCompileTime==
Dynamic || PlainObjectTypeInnerSize==
Dynamic 33 :
int(InnerStrideAtCompileTime) *
int(PlainObjectTypeInnerSize))
34 :
int(StrideType::OuterStrideAtCompileTime),
94 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
class Map 95 :
public MapBase<Map<PlainObjectType, MapOptions, StrideType> >
105 inline PointerType cast_to_pointer_type(PointerArgType
ptr) {
return ptr; }
110 return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;
116 return int(StrideType::OuterStrideAtCompileTime) != 0 ? m_stride.outer()
118 : IsVectorAtCompileTime ? (this->
size() * innerStride())
120 : (this->
rows() * innerStride());
130 : Base(cast_to_pointer_type(dataPtr)), m_stride(stride)
132 PlainObjectType::Base::_check_template_params();
143 : Base(cast_to_pointer_type(dataPtr), size), m_stride(stride)
145 PlainObjectType::Base::_check_template_params();
157 : Base(cast_to_pointer_type(dataPtr), rows, cols), m_stride(stride)
159 PlainObjectType::Base::_check_template_params();
171 #endif // EIGEN_MAP_H
A matrix or vector expression mapping an existing array of data.
traits< PlainObjectType > TraitsBase
const unsigned int LvalueBit
Namespace containing all symbols from the Eigen library.
const unsigned int RowMajorBit
EIGEN_DEVICE_FUNC Index innerStride() const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_DEVICE_FUNC Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType &stride=StrideType())
#define EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Derived)
EIGEN_DEVICE_FUNC Index outerStride() const
const unsigned int NestByRefBit
EIGEN_DEVICE_FUNC Map(PointerArgType dataPtr, const StrideType &stride=StrideType())
PointerType PointerArgType
EIGEN_DEVICE_FUNC Map(PointerArgType dataPtr, Index size, const StrideType &stride=StrideType())
#define EIGEN_DENSE_PUBLIC_INTERFACE(Derived)
Base::PointerType PointerType