diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-10-23 14:26:14 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-10-23 14:26:14 +0200 |
commit | a382963b04d4b847c6b0ef0611511fb6a8e11718 (patch) | |
tree | ad12bedf1d6537b14219889c49b82773a9bc8fab /Eigen/src/Core/Block.h | |
parent | 83a7b7c44c4842e1cfa89179624f4448d39a9e5b (diff) |
* extend Map to allow the user to specify whether the mapped data
is aligned or not. This is done using the Aligned constant:
Map<MatrixType,Aligned>::Map(data);
* rename ForceAligned to EnforceAlignedAccess, and update its doc,
and emphasize this is mainly an internal stuff.
Diffstat (limited to 'Eigen/src/Core/Block.h')
-rw-r--r-- | Eigen/src/Core/Block.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index cebfeaf75..5fffdcb01 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -33,10 +33,10 @@ * \param MatrixType the type of the object in which we are taking a block * \param BlockRows the number of rows of the block we are taking at compile time (optional) * \param BlockCols the number of columns of the block we are taking at compile time (optional) - * \param _PacketAccess allows to enforce aligned loads and stores if set to \b ForceAligned. - * The default is \b AsRequested. This parameter is internaly used by Eigen - * in expressions such as \code mat.block() += other; \endcode and most of - * the time this is the only way it is used. + * \param _PacketAccess \internal used to enforce aligned loads in expressions such as + * \code mat.block() += other; \endcode. Possible values are + * \c AsRequested (default) and \c EnforceAlignedAccess. + * See class MapBase for more details. * \param _DirectAccessStatus \internal used for partial specialization * * This class represents an expression of either a fixed-size or dynamic-size block. It is the return @@ -84,9 +84,9 @@ struct ei_traits<Block<MatrixType, BlockRows, BlockCols, _PacketAccess, _DirectA CoeffReadCost = ei_traits<MatrixType>::CoeffReadCost, PacketAccess = _PacketAccess }; - typedef typename ei_meta_if<int(PacketAccess)==ForceAligned, + typedef typename ei_meta_if<int(PacketAccess)==EnforceAlignedAccess, Block<MatrixType, BlockRows, BlockCols, _PacketAccess, _DirectAccessStatus>&, - Block<MatrixType, BlockRows, BlockCols, ForceAligned, _DirectAccessStatus> >::ret AlignedDerivedType; + Block<MatrixType, BlockRows, BlockCols, EnforceAlignedAccess, _DirectAccessStatus> >::ret AlignedDerivedType; }; template<typename MatrixType, int BlockRows, int BlockCols, int PacketAccess, int _DirectAccessStatus> class Block @@ -228,13 +228,13 @@ class Block<MatrixType,BlockRows,BlockCols,PacketAccess,HasDirectAccess> class InnerIterator; typedef typename ei_traits<Block>::AlignedDerivedType AlignedDerivedType; - friend class Block<MatrixType,BlockRows,BlockCols,PacketAccess==AsRequested?ForceAligned:AsRequested,HasDirectAccess>; + friend class Block<MatrixType,BlockRows,BlockCols,PacketAccess==EnforceAlignedAccess?AsRequested:EnforceAlignedAccess,HasDirectAccess>; EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) - AlignedDerivedType _convertToForceAligned() + AlignedDerivedType _convertToEnforceAlignedAccess() { - return Block<MatrixType,BlockRows,BlockCols,ForceAligned,HasDirectAccess> + return Block<MatrixType,BlockRows,BlockCols,EnforceAlignedAccess,HasDirectAccess> (m_matrix, Base::m_data, Base::m_rows.value(), Base::m_cols.value()); } |