aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Map.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2008-08-09 21:57:50 +0000
committerGravatar Gael Guennebaud <g.gael@free.fr>2008-08-09 21:57:50 +0000
commit55e8d670ce206ea91aed5520688442ee6fed0fd2 (patch)
treea9746894658200f41e4ab80fc64b980081566a05 /Eigen/src/Core/Map.h
parentb13148c3588c2be8805630c117cdc2b4cfb00576 (diff)
Renamed allowAligned() => forceAligned() and added the constants ForceAligned
and AsRequested for the PacketAccess parameter of MapBase. Updated respective documentation.
Diffstat (limited to 'Eigen/src/Core/Map.h')
-rw-r--r--Eigen/src/Core/Map.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/Eigen/src/Core/Map.h b/Eigen/src/Core/Map.h
index a1953993f..85fbcc0f0 100644
--- a/Eigen/src/Core/Map.h
+++ b/Eigen/src/Core/Map.h
@@ -30,8 +30,11 @@
*
* \brief A matrix or vector expression mapping an existing array of data.
*
- * \param _PacketAccess controls whether vectorized aligned loads or stores are allowed (Aligned)
- * or forced to unaligned (Unaligned). Defaults to Unaligned.
+ * \param MatrixType the equivalent matrix type of the mapped data
+ * \param _PacketAccess allows to enforce aligned loads and stores if set to ForceAligned.
+ * The default is AsRequested. This parameter is internaly used by Eigen
+ * in expressions such as \code Map<...>(...) += other; \endcode and most
+ * of the time this is the only way it is used.
*
* 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,
@@ -48,9 +51,9 @@ struct ei_traits<Map<MatrixType, _PacketAccess> > : public ei_traits<MatrixType>
PacketAccess = _PacketAccess,
Flags = ei_traits<MatrixType>::Flags & ~AlignedBit
};
- typedef typename ei_meta_if<int(PacketAccess)==Aligned,
+ typedef typename ei_meta_if<int(PacketAccess)==ForceAligned,
Map<MatrixType, _PacketAccess>&,
- Map<MatrixType, Aligned> >::ret AlignedDerivedType;
+ Map<MatrixType, ForceAligned> >::ret AlignedDerivedType;
};
template<typename MatrixType, int PacketAccess> class Map
@@ -63,12 +66,12 @@ template<typename MatrixType, int PacketAccess> class Map
inline int stride() const { return this->innerSize(); }
- AlignedDerivedType allowAligned()
+ AlignedDerivedType forceAligned()
{
- if (PacketAccess==Aligned)
+ if (PacketAccess==ForceAligned)
return *this;
else
- return Map<MatrixType,Aligned>(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) {}