diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 16:30:14 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 16:30:14 +0100 |
commit | 4af1753b6fa83e2c0013f38e6d9e8538896d9d3c (patch) | |
tree | 65d8d1573ba8505e30f22e5939b804f0206135de /Eigen/src/Core/Map.h | |
parent | eb8f4500719b52f410c545f738d8fda399cea587 (diff) |
* remove EnforceAlignedAccess option to Block, VectorBlock, Map and MapBase
because thanks to the previous commit this is not needed anymore
* add a more general ForceAlignedAccess expression which can be used for any expression.
It is already used by StableNorm.h.
Diffstat (limited to 'Eigen/src/Core/Map.h')
-rw-r--r-- | Eigen/src/Core/Map.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h index dba7e20e4..de93ce30b 100644 --- a/Eigen/src/Core/Map.h +++ b/Eigen/src/Core/Map.h @@ -31,8 +31,8 @@ * \brief A matrix or vector expression mapping an existing array of data. * * \param MatrixType the equivalent matrix type of the mapped data - * \param PointerAlignment specifies whether the pointer is \c Aligned, or \c Unaligned. - * The default is \c Unaligned. + * \param Options specifies whether the pointer is \c Aligned, or \c Unaligned. + * The default is \c Unaligned. * * 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, @@ -46,23 +46,15 @@ * * This class is the return type of Matrix::Map() but can also be used directly. * - * \b Note \b to \b Eigen \b developers: The template parameter \c PointerAlignment - * can also be or-ed with \c EnforceAlignedAccess in order to enforce aligned read - * in expressions such as \code A += B; \endcode. See class MapBase for further details. - * * \sa Matrix::Map() */ template<typename MatrixType, int Options> struct ei_traits<Map<MatrixType, Options> > : public ei_traits<MatrixType> { enum { - PacketAccess = Options & EnforceAlignedAccess, Flags = (Options&Aligned)==Aligned ? ei_traits<MatrixType>::Flags | AlignedBit : ei_traits<MatrixType>::Flags & ~AlignedBit }; - typedef typename ei_meta_if<int(PacketAccess)==EnforceAlignedAccess, - Map<MatrixType, Options>&, - Map<MatrixType, Options|EnforceAlignedAccess> >::ret AlignedDerivedType; }; template<typename MatrixType, int Options> class Map @@ -71,15 +63,9 @@ template<typename MatrixType, int Options> class Map public: _EIGEN_GENERIC_PUBLIC_INTERFACE(Map, MapBase<Map>) - typedef typename ei_traits<Map>::AlignedDerivedType AlignedDerivedType; inline int stride() const { return this->innerSize(); } - AlignedDerivedType _convertToEnforceAlignedAccess() - { - return AlignedDerivedType(Base::m_data, Base::m_rows.value(), Base::m_cols.value()); - } - inline Map(const Scalar* data) : Base(data) {} inline Map(const Scalar* data, int size) : Base(data, size) {} |