mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix MapBase's ForceAligned concept which was not working at all....
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
* This class represents a matrix or vector expression mapping an existing array of data.
|
||||
* It can be used to let Eigen interface without any overhead with non-Eigen data structures,
|
||||
* such as plain C arrays or structures from other libraries.
|
||||
*
|
||||
*
|
||||
* \b Tips: to change the array of data mapped by a Map object, you can use the C++
|
||||
* placement new syntax:
|
||||
*
|
||||
@@ -72,12 +72,9 @@ template<typename MatrixType, int PacketAccess> class Map
|
||||
|
||||
inline int stride() const { return this->innerSize(); }
|
||||
|
||||
AlignedDerivedType forceAligned()
|
||||
AlignedDerivedType _convertToForceAligned()
|
||||
{
|
||||
if (PacketAccess==ForceAligned)
|
||||
return *this;
|
||||
else
|
||||
return Map<MatrixType,ForceAligned>(Base::m_data, Base::m_rows.value(), Base::m_cols.value());
|
||||
return Map<MatrixType,ForceAligned>(Base::m_data, Base::m_rows.value(), Base::m_cols.value());
|
||||
}
|
||||
|
||||
inline Map(const Scalar* data) : Base(data) {}
|
||||
@@ -85,7 +82,7 @@ template<typename MatrixType, int PacketAccess> class Map
|
||||
inline Map(const Scalar* data, int size) : Base(data, size) {}
|
||||
|
||||
inline Map(const Scalar* data, int rows, int cols) : Base(data, rows, cols) {}
|
||||
|
||||
|
||||
inline void resize(int rows, int cols)
|
||||
{
|
||||
EIGEN_ONLY_USED_FOR_DEBUG(rows);
|
||||
|
||||
Reference in New Issue
Block a user