diff options
Diffstat (limited to 'eigen/Eigen/src/Core/VectorBlock.h')
-rw-r--r-- | eigen/Eigen/src/Core/VectorBlock.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/eigen/Eigen/src/Core/VectorBlock.h b/eigen/Eigen/src/Core/VectorBlock.h index 1a7330f..d72fbf7 100644 --- a/eigen/Eigen/src/Core/VectorBlock.h +++ b/eigen/Eigen/src/Core/VectorBlock.h @@ -13,13 +13,23 @@ namespace Eigen { +namespace internal { +template<typename VectorType, int Size> +struct traits<VectorBlock<VectorType, Size> > + : public traits<Block<VectorType, + traits<VectorType>::Flags & RowMajorBit ? 1 : Size, + traits<VectorType>::Flags & RowMajorBit ? Size : 1> > +{ +}; +} + /** \class VectorBlock * \ingroup Core_Module * * \brief Expression of a fixed-size or dynamic-size sub-vector * - * \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) + * \tparam VectorType the type of the object in which we are taking a sub-vector + * \tparam Size size of the sub-vector we are taking at compile time (optional) * * This class represents an expression of either a fixed-size or dynamic-size sub-vector. * It is the return type of DenseBase::segment(Index,Index) and DenseBase::segment<int>(Index) and @@ -43,17 +53,6 @@ namespace Eigen { * * \sa class Block, DenseBase::segment(Index,Index,Index,Index), DenseBase::segment(Index,Index) */ - -namespace internal { -template<typename VectorType, int Size> -struct traits<VectorBlock<VectorType, Size> > - : public traits<Block<VectorType, - traits<VectorType>::Flags & RowMajorBit ? 1 : Size, - traits<VectorType>::Flags & RowMajorBit ? Size : 1> > -{ -}; -} - template<typename VectorType, int Size> class VectorBlock : public Block<VectorType, internal::traits<VectorType>::Flags & RowMajorBit ? 1 : Size, @@ -72,6 +71,7 @@ template<typename VectorType, int Size> class VectorBlock /** Dynamic-size constructor */ + EIGEN_DEVICE_FUNC inline VectorBlock(VectorType& vector, Index start, Index size) : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start, @@ -82,6 +82,7 @@ template<typename VectorType, int Size> class VectorBlock /** Fixed-size constructor */ + EIGEN_DEVICE_FUNC inline VectorBlock(VectorType& vector, Index start) : Base(vector, IsColVector ? start : 0, IsColVector ? 0 : start) { |