aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/VectorBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/VectorBlock.h')
-rw-r--r--Eigen/src/Core/VectorBlock.h49
1 files changed, 21 insertions, 28 deletions
diff --git a/Eigen/src/Core/VectorBlock.h b/Eigen/src/Core/VectorBlock.h
index 15b3a2aa5..760c097ad 100644
--- a/Eigen/src/Core/VectorBlock.h
+++ b/Eigen/src/Core/VectorBlock.h
@@ -32,13 +32,9 @@
*
* \param VectorType the type of the object in which we are taking a sub-vector
* \param Size size of the sub-vector we are taking at compile time (optional)
- * \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 mat.segment() += other; \endcode and most of
- * the time this is the only way it is used.
*
* This class represents an expression of either a fixed-size or dynamic-size sub-vector.
- * It is the return type of MatrixBase::segment(int,int) and MatrixBase::segment<int>(int) and
+ * It is the return type of DenseBase::segment(int,int) and DenseBase::segment<int>(int) and
* most of the time this is the only way it is used.
*
* However, if you want to directly maniputate sub-vector expressions,
@@ -57,32 +53,29 @@
* \include class_FixedVectorBlock.cpp
* Output: \verbinclude class_FixedVectorBlock.out
*
- * \sa class Block, MatrixBase::segment(int,int,int,int), MatrixBase::segment(int,int)
+ * \sa class Block, DenseBase::segment(int,int,int,int), DenseBase::segment(int,int)
*/
-template<typename VectorType, int Size, int _PacketAccess>
-struct ei_traits<VectorBlock<VectorType, Size, _PacketAccess> >
+template<typename VectorType, int Size>
+struct ei_traits<VectorBlock<VectorType, Size> >
: public ei_traits<Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
- ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size,
- _PacketAccess> >
+ ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size> >
{
};
-template<typename VectorType, int Size, int PacketAccess> class VectorBlock
+template<typename VectorType, int Size> class VectorBlock
: public Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
- ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size,
- PacketAccess>
+ ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size>
{
typedef Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
- ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size,
- PacketAccess> _Base;
+ ei_traits<VectorType>::ColsAtCompileTime==1 ? 1 : Size> Base;
enum {
IsColVector = ei_traits<VectorType>::ColsAtCompileTime==1
};
public:
- _EIGEN_GENERIC_PUBLIC_INTERFACE(VectorBlock, _Base)
+ _EIGEN_GENERIC_PUBLIC_INTERFACE(VectorBlock)
using Base::operator=;
using Base::operator+=;
@@ -128,7 +121,7 @@ template<typename VectorType, int Size, int PacketAccess> class VectorBlock
* \sa class Block, segment(int)
*/
template<typename Derived>
-inline VectorBlock<Derived> MatrixBase<Derived>
+inline VectorBlock<Derived> DenseBase<Derived>
::segment(int start, int size)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
@@ -138,7 +131,7 @@ inline VectorBlock<Derived> MatrixBase<Derived>
/** This is the const version of segment(int,int).*/
template<typename Derived>
inline const VectorBlock<Derived>
-MatrixBase<Derived>::segment(int start, int size) const
+DenseBase<Derived>::segment(int start, int size) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived>(derived(), start, size);
@@ -161,7 +154,7 @@ MatrixBase<Derived>::segment(int start, int size) const
*/
template<typename Derived>
inline VectorBlock<Derived>
-MatrixBase<Derived>::head(int size)
+DenseBase<Derived>::head(int size)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived>(derived(), 0, size);
@@ -170,7 +163,7 @@ MatrixBase<Derived>::head(int size)
/** This is the const version of head(int).*/
template<typename Derived>
inline const VectorBlock<Derived>
-MatrixBase<Derived>::head(int size) const
+DenseBase<Derived>::head(int size) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived>(derived(), 0, size);
@@ -193,7 +186,7 @@ MatrixBase<Derived>::head(int size) const
*/
template<typename Derived>
inline VectorBlock<Derived>
-MatrixBase<Derived>::tail(int size)
+DenseBase<Derived>::tail(int size)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived>(derived(), this->size() - size, size);
@@ -202,7 +195,7 @@ MatrixBase<Derived>::tail(int size)
/** This is the const version of tail(int).*/
template<typename Derived>
inline const VectorBlock<Derived>
-MatrixBase<Derived>::tail(int size) const
+DenseBase<Derived>::tail(int size) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived>(derived(), this->size() - size, size);
@@ -224,7 +217,7 @@ MatrixBase<Derived>::tail(int size) const
template<typename Derived>
template<int Size>
inline VectorBlock<Derived,Size>
-MatrixBase<Derived>::segment(int start)
+DenseBase<Derived>::segment(int start)
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived,Size>(derived(), start);
@@ -234,7 +227,7 @@ MatrixBase<Derived>::segment(int start)
template<typename Derived>
template<int Size>
inline const VectorBlock<Derived,Size>
-MatrixBase<Derived>::segment(int start) const
+DenseBase<Derived>::segment(int start) const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived,Size>(derived(), start);
@@ -254,7 +247,7 @@ MatrixBase<Derived>::segment(int start) const
template<typename Derived>
template<int Size>
inline VectorBlock<Derived,Size>
-MatrixBase<Derived>::head()
+DenseBase<Derived>::head()
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived,Size>(derived(), 0);
@@ -264,7 +257,7 @@ MatrixBase<Derived>::head()
template<typename Derived>
template<int Size>
inline const VectorBlock<Derived,Size>
-MatrixBase<Derived>::head() const
+DenseBase<Derived>::head() const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived,Size>(derived(), 0);
@@ -284,7 +277,7 @@ MatrixBase<Derived>::head() const
template<typename Derived>
template<int Size>
inline VectorBlock<Derived,Size>
-MatrixBase<Derived>::tail()
+DenseBase<Derived>::tail()
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived, Size>(derived(), size() - Size);
@@ -294,7 +287,7 @@ MatrixBase<Derived>::tail()
template<typename Derived>
template<int Size>
inline const VectorBlock<Derived,Size>
-MatrixBase<Derived>::tail() const
+DenseBase<Derived>::tail() const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return VectorBlock<Derived, Size>(derived(), size() - Size);