fix MapBase's ForceAligned concept which was not working at all....

This commit is contained in:
Gael Guennebaud
2009-03-09 19:23:31 +00:00
parent 3f80c68be5
commit db6c3d0197
4 changed files with 34 additions and 17 deletions

View File

@@ -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);