17 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
18 struct traits<Map<PlainObjectType, MapOptions, StrideType> >
19 :
public traits<PlainObjectType>
21 typedef traits<PlainObjectType> TraitsBase;
23 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
24 ? int(PlainObjectType::InnerStrideAtCompileTime)
25 : int(StrideType::InnerStrideAtCompileTime),
26 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
27 ? int(PlainObjectType::OuterStrideAtCompileTime)
28 : int(StrideType::OuterStrideAtCompileTime),
29 Alignment = int(MapOptions)&int(AlignedMask),
30 Flags0 = TraitsBase::Flags & (~NestByRefBit),
31 Flags = is_lvalue<PlainObjectType>::value ? int(Flags0) : (int(Flags0) & ~
LvalueBit)
88 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
class Map 89 :
public MapBase<Map<PlainObjectType, MapOptions, StrideType> >
93 typedef MapBase<Map> Base;
94 EIGEN_DENSE_PUBLIC_INTERFACE(
Map)
96 typedef typename Base::PointerType PointerType;
97 typedef PointerType PointerArgType;
99 inline PointerType cast_to_pointer_type(PointerArgType ptr) {
return ptr; }
102 inline Index innerStride()
const 104 return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;
108 inline Index outerStride()
const 110 return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()
111 : IsVectorAtCompileTime ? this->size()
122 explicit inline Map(PointerArgType dataPtr,
const StrideType& stride = StrideType())
123 : Base(cast_to_pointer_type(dataPtr)), m_stride(stride)
125 PlainObjectType::Base::_check_template_params();
135 inline Map(PointerArgType dataPtr,
Index size,
const StrideType& stride = StrideType())
136 : Base(cast_to_pointer_type(dataPtr), size), m_stride(stride)
138 PlainObjectType::Base::_check_template_params();
149 inline Map(PointerArgType dataPtr,
Index rows,
Index cols,
const StrideType& stride = StrideType())
150 : Base(cast_to_pointer_type(dataPtr), rows, cols), m_stride(stride)
152 PlainObjectType::Base::_check_template_params();
155 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(
Map)
164 #endif // EIGEN_MAP_H A matrix or vector expression mapping an existing array of data.
Definition: Map.h:88
const unsigned int LvalueBit
Definition: Constants.h:139
Namespace containing all symbols from the Eigen library.
Definition: Core:287
const unsigned int RowMajorBit
Definition: Constants.h:61
Map(PointerArgType dataPtr, const StrideType &stride=StrideType())
Definition: Map.h:122
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Map(PointerArgType dataPtr, Index size, const StrideType &stride=StrideType())
Definition: Map.h:135
Definition: Eigen_Colamd.h:50
Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType &stride=StrideType())
Definition: Map.h:149