68 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
69 struct traits<Map<PlainObjectType, MapOptions, StrideType> >
70 :
public traits<PlainObjectType>
72 typedef traits<PlainObjectType> TraitsBase;
74 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
75 ? int(PlainObjectType::InnerStrideAtCompileTime)
76 : int(StrideType::InnerStrideAtCompileTime),
77 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
78 ? int(PlainObjectType::OuterStrideAtCompileTime)
79 : int(StrideType::OuterStrideAtCompileTime),
80 Alignment = int(MapOptions)&int(AlignedMask),
81 Flags0 = TraitsBase::Flags & (~NestByRefBit),
82 Flags = is_lvalue<PlainObjectType>::value ? int(Flags0) : (int(Flags0) & ~
LvalueBit)
89 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
class Map
90 :
public MapBase<Map<PlainObjectType, MapOptions, StrideType> >
95 EIGEN_DENSE_PUBLIC_INTERFACE(
Map)
97 typedef typename Base::PointerType PointerType;
98 typedef PointerType PointerArgType;
100 inline PointerType cast_to_pointer_type(PointerArgType ptr) {
return ptr; }
103 inline Index innerStride()
const
105 return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;
109 inline Index outerStride()
const
111 return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()
112 : IsVectorAtCompileTime ? this->size()
123 explicit inline Map(PointerArgType dataPtr,
const StrideType& stride = StrideType())
124 : Base(cast_to_pointer_type(dataPtr)), m_stride(stride)
126 PlainObjectType::Base::_check_template_params();
136 inline Map(PointerArgType dataPtr, Index size,
const StrideType& stride = StrideType())
137 : Base(cast_to_pointer_type(dataPtr), size), m_stride(stride)
139 PlainObjectType::Base::_check_template_params();
150 inline Map(PointerArgType dataPtr, Index rows, Index cols,
const StrideType& stride = StrideType())
151 : Base(cast_to_pointer_type(dataPtr), rows, cols), m_stride(stride)
153 PlainObjectType::Base::_check_template_params();
156 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(
Map)
165 #endif // EIGEN_MAP_H
Base class for Map and Block expression with direct access.
Definition: ForwardDeclarations.h:117
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:89
const unsigned int LvalueBit
Definition: Constants.h:138
const unsigned int RowMajorBit
Definition: Constants.h:61
Map(PointerArgType dataPtr, const StrideType &stride=StrideType())
Definition: Map.h:123
Map(PointerArgType dataPtr, Index size, const StrideType &stride=StrideType())
Definition: Map.h:136
Definition: Eigen_Colamd.h:54
Map(PointerArgType dataPtr, Index rows, Index cols, const StrideType &stride=StrideType())
Definition: Map.h:150