68 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
69 struct traits<
Map<PlainObjectType, MapOptions, StrideType> >
70 :
public traits<PlainObjectType>
73 typedef typename PlainObjectType::Index Index;
76 InnerStrideAtCompileTime = StrideType::InnerStrideAtCompileTime == 0
77 ? int(PlainObjectType::InnerStrideAtCompileTime)
78 : int(StrideType::InnerStrideAtCompileTime),
79 OuterStrideAtCompileTime = StrideType::OuterStrideAtCompileTime == 0
80 ? int(PlainObjectType::OuterStrideAtCompileTime)
81 : int(StrideType::OuterStrideAtCompileTime),
82 HasNoInnerStride = InnerStrideAtCompileTime == 1,
83 HasNoOuterStride = StrideType::OuterStrideAtCompileTime == 0,
84 HasNoStride = HasNoInnerStride && HasNoOuterStride,
85 IsAligned = bool(EIGEN_ALIGN) && ((int(MapOptions)&
Aligned)==
Aligned),
86 IsDynamicSize = PlainObjectType::SizeAtCompileTime==
Dynamic,
87 KeepsPacketAccess = bool(HasNoInnerStride)
88 && ( bool(IsDynamicSize)
90 || ( OuterStrideAtCompileTime!=
Dynamic 91 && ((
static_cast<int>(
sizeof(
Scalar))*OuterStrideAtCompileTime)%16)==0 ) ),
92 Flags0 = TraitsBase::Flags & (~NestByRefBit),
94 Flags2 = (
bool(HasNoStride) || bool(PlainObjectType::IsVectorAtCompileTime))
97 Flags = KeepsPacketAccess ?
int(Flags3) : (int(Flags3) & ~
PacketAccessBit)
104 template<
typename PlainObjectType,
int MapOptions,
typename Str
ideType>
class Map 105 :
public MapBase<Map<PlainObjectType, MapOptions, StrideType> >
110 EIGEN_DENSE_PUBLIC_INTERFACE(
Map)
112 typedef typename Base::PointerType PointerType;
113 #if EIGEN2_SUPPORT_STAGE <= STAGE30_FULL_EIGEN3_API 114 typedef const Scalar* PointerArgType;
115 inline PointerType cast_to_pointer_type(PointerArgType ptr) {
return const_cast<PointerType
>(ptr); }
117 typedef PointerType PointerArgType;
118 inline PointerType cast_to_pointer_type(PointerArgType ptr) {
return ptr; }
121 inline Index innerStride()
const 123 return StrideType::InnerStrideAtCompileTime != 0 ? m_stride.inner() : 1;
126 inline Index outerStride()
const 128 return StrideType::OuterStrideAtCompileTime != 0 ? m_stride.outer()
129 : IsVectorAtCompileTime ? this->
size()
139 inline Map(PointerArgType dataPtr,
const StrideType& a_stride = StrideType())
140 : Base(cast_to_pointer_type(dataPtr)), m_stride(a_stride)
142 PlainObjectType::Base::_check_template_params();
151 inline Map(PointerArgType dataPtr, Index a_size,
const StrideType& a_stride = StrideType())
152 : Base(cast_to_pointer_type(dataPtr), a_size), m_stride(a_stride)
154 PlainObjectType::Base::_check_template_params();
164 inline Map(PointerArgType dataPtr, Index nbRows, Index nbCols,
const StrideType& a_stride = StrideType())
165 : Base(cast_to_pointer_type(dataPtr), nbRows, nbCols), m_stride(a_stride)
167 PlainObjectType::Base::_check_template_params();
170 EIGEN_INHERIT_ASSIGNMENT_OPERATORS(
Map)
176 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
183 template<
typename _Scalar,
int _Rows,
int _Cols,
int _Options,
int _MaxRows,
int _MaxCols>
192 #endif // EIGEN_MAP_H Map(PointerArgType dataPtr, Index a_size, const StrideType &a_stride=StrideType())
Constructor in the dynamic-size vector case.
Definition: Map.h:151
Base class for Map and Block expression with direct access.
Definition: ForwardDeclarations.h:109
A matrix or vector expression mapping an existing array of data.
Definition: Map.h:104
const unsigned int LvalueBit
Means the expression has a coeffRef() method, i.e.
Definition: Constants.h:131
iterative scaling algorithm to equilibrate rows and column norms in matrices
Definition: TestIMU_Common.h:87
Map(PointerArgType dataPtr, Index nbRows, Index nbCols, const StrideType &a_stride=StrideType())
Constructor in the dynamic-size matrix case.
Definition: Map.h:164
const unsigned int RowMajorBit
for a matrix, this means that the storage order is row-major.
Definition: Constants.h:53
Object is aligned for vectorization.
Definition: Constants.h:194
const unsigned int PacketAccessBit
Short version: means the expression might be vectorized.
Definition: Constants.h:81
const unsigned int AlignedBit
means the first coefficient packet is guaranteed to be aligned
Definition: Constants.h:147
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
EIGEN_STRONG_INLINE Matrix()
Default constructor.
Definition: Matrix.h:203
Map(PointerArgType dataPtr, const StrideType &a_stride=StrideType())
Constructor in the fixed-size case.
Definition: Map.h:139
EIGEN_STRONG_INLINE Array()
Default constructor.
Definition: Array.h:110
Definition: BandTriangularSolver.h:13
const int Dynamic
This value means that a positive quantity (e.g., a size) is not known at compile-time, and that instead the value is stored in some runtime variable.
Definition: Constants.h:21
const unsigned int LinearAccessBit
Short version: means the expression can be seen as 1D vector.
Definition: Constants.h:117
Definition: ForwardDeclarations.h:17
Definition: XprHelper.h:459
Definition: osvr_print_tree.cpp:52
double Scalar
Common scalar type.
Definition: FlexibleKalmanBase.h:48