bug #1680: make all "block" methods strong-inline and device-functions (some were missing EIGEN_DEVICE_FUNC)

This commit is contained in:
Gael Guennebaud 2019-02-15 16:33:56 +01:00
parent 559320745e
commit 0505248f25

View File

@ -87,11 +87,11 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block, fix, fix<N>(int) /// \sa class Block, fix, fix<N>(int)
/// ///
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename FixedBlockXpr<...,...>::Type typename FixedBlockXpr<...,...>::Type
#endif #endif
block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
{ {
@ -101,11 +101,11 @@ block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols)
/// This is the const version of block(Index,Index,NRowsType,NColsType) /// This is the const version of block(Index,Index,NRowsType,NColsType)
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstFixedBlockXpr<...,...>::Type const typename ConstFixedBlockXpr<...,...>::Type
#endif #endif
block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) const block(Index startRow, Index startCol, NRowsType blockRows, NColsType blockCols) const
{ {
@ -133,11 +133,11 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename FixedBlockXpr<...,...>::Type typename FixedBlockXpr<...,...>::Type
#endif #endif
topRightCorner(NRowsType cRows, NColsType cCols) topRightCorner(NRowsType cRows, NColsType cCols)
{ {
@ -147,11 +147,11 @@ topRightCorner(NRowsType cRows, NColsType cCols)
/// This is the const version of topRightCorner(NRowsType, NColsType). /// This is the const version of topRightCorner(NRowsType, NColsType).
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstFixedBlockXpr<...,...>::Type const typename ConstFixedBlockXpr<...,...>::Type
#endif #endif
topRightCorner(NRowsType cRows, NColsType cCols) const topRightCorner(NRowsType cRows, NColsType cCols) const
{ {
@ -172,16 +172,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block, block<int,int>(Index,Index) /// \sa class Block, block<int,int>(Index,Index)
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner() typename FixedBlockXpr<CRows,CCols>::Type topRightCorner()
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
} }
/// This is the const version of topRightCorner<int, int>(). /// This is the const version of topRightCorner<int, int>().
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner() const const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner() const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - CCols);
} }
@ -206,14 +206,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block /// \sa class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
inline typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols)
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
} }
/// This is the const version of topRightCorner<int, int>(Index, Index). /// This is the const version of topRightCorner<int, int>(Index, Index).
template<int CRows, int CCols> template<int CRows, int CCols>
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) const EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows,CCols>::Type topRightCorner(Index cRows, Index cCols) const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, cols() - cCols, cRows, cCols);
} }
@ -238,11 +240,11 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename FixedBlockXpr<...,...>::Type typename FixedBlockXpr<...,...>::Type
#endif #endif
topLeftCorner(NRowsType cRows, NColsType cCols) topLeftCorner(NRowsType cRows, NColsType cCols)
{ {
@ -252,11 +254,11 @@ topLeftCorner(NRowsType cRows, NColsType cCols)
/// This is the const version of topLeftCorner(Index, Index). /// This is the const version of topLeftCorner(Index, Index).
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstFixedBlockXpr<...,...>::Type const typename ConstFixedBlockXpr<...,...>::Type
#endif #endif
topLeftCorner(NRowsType cRows, NColsType cCols) const topLeftCorner(NRowsType cRows, NColsType cCols) const
{ {
@ -276,16 +278,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner() typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner()
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
} }
/// This is the const version of topLeftCorner<int, int>(). /// This is the const version of topLeftCorner<int, int>().
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner() const const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner() const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0);
} }
@ -310,14 +312,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block /// \sa class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
inline typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols)
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
} }
/// This is the const version of topLeftCorner<int, int>(Index, Index). /// This is the const version of topLeftCorner<int, int>(Index, Index).
template<int CRows, int CCols> template<int CRows, int CCols>
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) const EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows,CCols>::Type topLeftCorner(Index cRows, Index cCols) const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), 0, 0, cRows, cCols);
} }
@ -342,11 +346,11 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename FixedBlockXpr<...,...>::Type typename FixedBlockXpr<...,...>::Type
#endif #endif
bottomRightCorner(NRowsType cRows, NColsType cCols) bottomRightCorner(NRowsType cRows, NColsType cCols)
{ {
@ -357,11 +361,11 @@ bottomRightCorner(NRowsType cRows, NColsType cCols)
/// This is the const version of bottomRightCorner(NRowsType, NColsType). /// This is the const version of bottomRightCorner(NRowsType, NColsType).
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type const typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstFixedBlockXpr<...,...>::Type const typename ConstFixedBlockXpr<...,...>::Type
#endif #endif
bottomRightCorner(NRowsType cRows, NColsType cCols) const bottomRightCorner(NRowsType cRows, NColsType cCols) const
{ {
@ -382,16 +386,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner() typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner()
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
} }
/// This is the const version of bottomRightCorner<int, int>(). /// This is the const version of bottomRightCorner<int, int>().
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner() const const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner() const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, cols() - CCols);
} }
@ -416,14 +420,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block /// \sa class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
inline typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols)
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
} }
/// This is the const version of bottomRightCorner<int, int>(Index, Index). /// This is the const version of bottomRightCorner<int, int>(Index, Index).
template<int CRows, int CCols> template<int CRows, int CCols>
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) const EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomRightCorner(Index cRows, Index cCols) const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, cols() - cCols, cRows, cCols);
} }
@ -448,11 +454,11 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename FixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename FixedBlockXpr<...,...>::Type typename FixedBlockXpr<...,...>::Type
#endif #endif
bottomLeftCorner(NRowsType cRows, NColsType cCols) bottomLeftCorner(NRowsType cRows, NColsType cCols)
{ {
@ -463,11 +469,11 @@ bottomLeftCorner(NRowsType cRows, NColsType cCols)
/// This is the const version of bottomLeftCorner(NRowsType, NColsType). /// This is the const version of bottomLeftCorner(NRowsType, NColsType).
template<typename NRowsType, typename NColsType> template<typename NRowsType, typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type typename ConstFixedBlockXpr<internal::get_fixed_value<NRowsType>::value,internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename ConstFixedBlockXpr<...,...>::Type typename ConstFixedBlockXpr<...,...>::Type
#endif #endif
bottomLeftCorner(NRowsType cRows, NColsType cCols) const bottomLeftCorner(NRowsType cRows, NColsType cCols) const
{ {
@ -488,16 +494,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner()
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
} }
/// This is the const version of bottomLeftCorner<int, int>(). /// This is the const version of bottomLeftCorner<int, int>().
template<int CRows, int CCols> template<int CRows, int CCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() const const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner() const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - CRows, 0);
} }
@ -522,14 +528,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa class Block /// \sa class Block
/// ///
template<int CRows, int CCols> template<int CRows, int CCols>
inline typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) EIGEN_STRONG_INLINE
typename FixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols)
{ {
return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols); return typename FixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
} }
/// This is the const version of bottomLeftCorner<int, int>(Index, Index). /// This is the const version of bottomLeftCorner<int, int>(Index, Index).
template<int CRows, int CCols> template<int CRows, int CCols>
inline const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) const EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<CRows,CCols>::Type bottomLeftCorner(Index cRows, Index cCols) const
{ {
return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols); return typename ConstFixedBlockXpr<CRows,CCols>::Type(derived(), rows() - cRows, 0, cRows, cCols);
} }
@ -553,11 +561,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline typename NRowsBlockXpr<...>::Type typename NRowsBlockXpr<...>::Type
#endif #endif
topRows(NRowsType n) topRows(NRowsType n)
{ {
@ -567,11 +575,11 @@ topRows(NRowsType n)
/// This is the const version of topRows(NRowsType). /// This is the const version of topRows(NRowsType).
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline const typename ConstNRowsBlockXpr<...>::Type const typename ConstNRowsBlockXpr<...>::Type
#endif #endif
topRows(NRowsType n) const topRows(NRowsType n) const
{ {
@ -595,16 +603,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NRowsBlockXpr<N>::Type topRows(Index n = N) typename NRowsBlockXpr<N>::Type topRows(Index n = N)
{ {
return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols()); return typename NRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
} }
/// This is the const version of topRows<int>(). /// This is the const version of topRows<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const typename ConstNRowsBlockXpr<N>::Type topRows(Index n = N) const
{ {
return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols()); return typename ConstNRowsBlockXpr<N>::Type(derived(), 0, 0, n, cols());
} }
@ -628,11 +636,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline typename NRowsBlockXpr<...>::Type typename NRowsBlockXpr<...>::Type
#endif #endif
bottomRows(NRowsType n) bottomRows(NRowsType n)
{ {
@ -642,11 +650,11 @@ bottomRows(NRowsType n)
/// This is the const version of bottomRows(NRowsType). /// This is the const version of bottomRows(NRowsType).
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline const typename ConstNRowsBlockXpr<...>::Type const typename ConstNRowsBlockXpr<...>::Type
#endif #endif
bottomRows(NRowsType n) const bottomRows(NRowsType n) const
{ {
@ -670,16 +678,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NRowsBlockXpr<N>::Type bottomRows(Index n = N) typename NRowsBlockXpr<N>::Type bottomRows(Index n = N)
{ {
return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols()); return typename NRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
} }
/// This is the const version of bottomRows<int>(). /// This is the const version of bottomRows<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const typename ConstNRowsBlockXpr<N>::Type bottomRows(Index n = N) const
{ {
return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols()); return typename ConstNRowsBlockXpr<N>::Type(derived(), rows() - n, 0, n, cols());
} }
@ -704,11 +712,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type typename NRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline typename NRowsBlockXpr<...>::Type typename NRowsBlockXpr<...>::Type
#endif #endif
middleRows(Index startRow, NRowsType n) middleRows(Index startRow, NRowsType n)
{ {
@ -718,11 +726,11 @@ middleRows(Index startRow, NRowsType n)
/// This is the const version of middleRows(Index,NRowsType). /// This is the const version of middleRows(Index,NRowsType).
template<typename NRowsType> template<typename NRowsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type const typename ConstNRowsBlockXpr<internal::get_fixed_value<NRowsType>::value>::Type
#else #else
inline const typename ConstNRowsBlockXpr<...>::Type const typename ConstNRowsBlockXpr<...>::Type
#endif #endif
middleRows(Index startRow, NRowsType n) const middleRows(Index startRow, NRowsType n) const
{ {
@ -747,16 +755,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) typename NRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N)
{ {
return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols()); return typename NRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
} }
/// This is the const version of middleRows<int>(). /// This is the const version of middleRows<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const typename ConstNRowsBlockXpr<N>::Type middleRows(Index startRow, Index n = N) const
{ {
return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols()); return typename ConstNRowsBlockXpr<N>::Type(derived(), startRow, 0, n, cols());
} }
@ -780,11 +788,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename NColsBlockXpr<...>::Type typename NColsBlockXpr<...>::Type
#endif #endif
leftCols(NColsType n) leftCols(NColsType n)
{ {
@ -794,11 +802,11 @@ leftCols(NColsType n)
/// This is the const version of leftCols(NColsType). /// This is the const version of leftCols(NColsType).
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstNColsBlockXpr<...>::Type const typename ConstNColsBlockXpr<...>::Type
#endif #endif
leftCols(NColsType n) const leftCols(NColsType n) const
{ {
@ -822,16 +830,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NColsBlockXpr<N>::Type leftCols(Index n = N) typename NColsBlockXpr<N>::Type leftCols(Index n = N)
{ {
return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n); return typename NColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
} }
/// This is the const version of leftCols<int>(). /// This is the const version of leftCols<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const typename ConstNColsBlockXpr<N>::Type leftCols(Index n = N) const
{ {
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n); return typename ConstNColsBlockXpr<N>::Type(derived(), 0, 0, rows(), n);
} }
@ -855,11 +863,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename NColsBlockXpr<...>::Type typename NColsBlockXpr<...>::Type
#endif #endif
rightCols(NColsType n) rightCols(NColsType n)
{ {
@ -869,11 +877,11 @@ rightCols(NColsType n)
/// This is the const version of rightCols(NColsType). /// This is the const version of rightCols(NColsType).
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstNColsBlockXpr<...>::Type const typename ConstNColsBlockXpr<...>::Type
#endif #endif
rightCols(NColsType n) const rightCols(NColsType n) const
{ {
@ -897,16 +905,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NColsBlockXpr<N>::Type rightCols(Index n = N) typename NColsBlockXpr<N>::Type rightCols(Index n = N)
{ {
return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n); return typename NColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
} }
/// This is the const version of rightCols<int>(). /// This is the const version of rightCols<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const typename ConstNColsBlockXpr<N>::Type rightCols(Index n = N) const
{ {
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n); return typename ConstNColsBlockXpr<N>::Type(derived(), 0, cols() - n, rows(), n);
} }
@ -931,11 +939,11 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type typename NColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline typename NColsBlockXpr<...>::Type typename NColsBlockXpr<...>::Type
#endif #endif
middleCols(Index startCol, NColsType numCols) middleCols(Index startCol, NColsType numCols)
{ {
@ -945,11 +953,11 @@ middleCols(Index startCol, NColsType numCols)
/// This is the const version of middleCols(Index,NColsType). /// This is the const version of middleCols(Index,NColsType).
template<typename NColsType> template<typename NColsType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type const typename ConstNColsBlockXpr<internal::get_fixed_value<NColsType>::value>::Type
#else #else
inline const typename ConstNColsBlockXpr<...>::Type const typename ConstNColsBlockXpr<...>::Type
#endif #endif
middleCols(Index startCol, NColsType numCols) const middleCols(Index startCol, NColsType numCols) const
{ {
@ -974,16 +982,16 @@ EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) typename NColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N)
{ {
return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n); return typename NColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
} }
/// This is the const version of middleCols<int>(). /// This is the const version of middleCols<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const typename ConstNColsBlockXpr<N>::Type middleCols(Index startCol, Index n = N) const
{ {
return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n); return typename ConstNColsBlockXpr<N>::Type(derived(), 0, startCol, rows(), n);
} }
@ -1015,16 +1023,16 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int NRows, int NCols> template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol)
{ {
return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol); return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
} }
/// This is the const version of block<>(Index, Index). */ /// This is the const version of block<>(Index, Index). */
template<int NRows, int NCols> template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) const const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol) const
{ {
return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol); return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol);
} }
@ -1061,8 +1069,8 @@ EIGEN_DOC_BLOCK_ADDONS_NOT_INNER_PANEL
/// \sa block(Index,Index,NRowsType,NColsType), class Block /// \sa block(Index,Index,NRowsType,NColsType), class Block
/// ///
template<int NRows, int NCols> template<int NRows, int NCols>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol, typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
Index blockRows, Index blockCols) Index blockRows, Index blockCols)
{ {
return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols); return typename FixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
@ -1070,7 +1078,8 @@ inline typename FixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index sta
/// This is the const version of block<>(Index, Index, Index, Index). /// This is the const version of block<>(Index, Index, Index, Index).
template<int NRows, int NCols> template<int NRows, int NCols>
inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol, EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow, Index startCol,
Index blockRows, Index blockCols) const Index blockRows, Index blockCols) const
{ {
return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols); return typename ConstFixedBlockXpr<NRows,NCols>::Type(derived(), startRow, startCol, blockRows, blockCols);
@ -1084,15 +1093,15 @@ inline const typename ConstFixedBlockXpr<NRows,NCols>::Type block(Index startRow
EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major) EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(column-major)
/** /**
* \sa row(), class Block */ * \sa row(), class Block */
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline ColXpr col(Index i) ColXpr col(Index i)
{ {
return ColXpr(derived(), i); return ColXpr(derived(), i);
} }
/// This is the const version of col(). /// This is the const version of col().
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline ConstColXpr col(Index i) const ConstColXpr col(Index i) const
{ {
return ConstColXpr(derived(), i); return ConstColXpr(derived(), i);
} }
@ -1105,15 +1114,15 @@ inline ConstColXpr col(Index i) const
EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major) EIGEN_DOC_BLOCK_ADDONS_INNER_PANEL_IF(row-major)
/** /**
* \sa col(), class Block */ * \sa col(), class Block */
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline RowXpr row(Index i) RowXpr row(Index i)
{ {
return RowXpr(derived(), i); return RowXpr(derived(), i);
} }
/// This is the const version of row(). */ /// This is the const version of row(). */
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline ConstRowXpr row(Index i) const ConstRowXpr row(Index i) const
{ {
return ConstRowXpr(derived(), i); return ConstRowXpr(derived(), i);
} }
@ -1140,11 +1149,11 @@ inline ConstRowXpr row(Index i) const
/// \sa block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block /// \sa block(Index,Index,NRowsType,NColsType), fix<N>, fix<N>(int), class Block
/// ///
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline typename FixedSegmentReturnType<...>::Type typename FixedSegmentReturnType<...>::Type
#endif #endif
segment(Index start, NType n) segment(Index start, NType n)
{ {
@ -1156,11 +1165,11 @@ segment(Index start, NType n)
/// This is the const version of segment(Index,NType). /// This is the const version of segment(Index,NType).
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline const typename ConstFixedSegmentReturnType<...>::Type const typename ConstFixedSegmentReturnType<...>::Type
#endif #endif
segment(Index start, NType n) const segment(Index start, NType n) const
{ {
@ -1190,11 +1199,11 @@ segment(Index start, NType n) const
/// \sa class Block, block(Index,Index) /// \sa class Block, block(Index,Index)
/// ///
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline typename FixedSegmentReturnType<...>::Type typename FixedSegmentReturnType<...>::Type
#endif #endif
head(NType n) head(NType n)
{ {
@ -1205,11 +1214,11 @@ head(NType n)
/// This is the const version of head(NType). /// This is the const version of head(NType).
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline const typename ConstFixedSegmentReturnType<...>::Type const typename ConstFixedSegmentReturnType<...>::Type
#endif #endif
head(NType n) const head(NType n) const
{ {
@ -1239,11 +1248,11 @@ head(NType n) const
/// \sa class Block, block(Index,Index) /// \sa class Block, block(Index,Index)
/// ///
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type typename FixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline typename FixedSegmentReturnType<...>::Type typename FixedSegmentReturnType<...>::Type
#endif #endif
tail(NType n) tail(NType n)
{ {
@ -1254,11 +1263,11 @@ tail(NType n)
/// This is the const version of tail(Index). /// This is the const version of tail(Index).
template<typename NType> template<typename NType>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
#ifndef EIGEN_PARSED_BY_DOXYGEN #ifndef EIGEN_PARSED_BY_DOXYGEN
inline const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type const typename ConstFixedSegmentReturnType<internal::get_fixed_value<NType>::value>::Type
#else #else
inline const typename ConstFixedSegmentReturnType<...>::Type const typename ConstFixedSegmentReturnType<...>::Type
#endif #endif
tail(NType n) const tail(NType n) const
{ {
@ -1284,8 +1293,8 @@ tail(NType n) const
/// \sa segment(Index,NType), class Block /// \sa segment(Index,NType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N) typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N)
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename FixedSegmentReturnType<N>::Type(derived(), start, n); return typename FixedSegmentReturnType<N>::Type(derived(), start, n);
@ -1293,8 +1302,8 @@ inline typename FixedSegmentReturnType<N>::Type segment(Index start, Index n = N
/// This is the const version of segment<int>(Index). /// This is the const version of segment<int>(Index).
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index n = N) const
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n); return typename ConstFixedSegmentReturnType<N>::Type(derived(), start, n);
@ -1316,8 +1325,8 @@ inline typename ConstFixedSegmentReturnType<N>::Type segment(Index start, Index
/// \sa head(NType), class Block /// \sa head(NType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedSegmentReturnType<N>::Type head(Index n = N) typename FixedSegmentReturnType<N>::Type head(Index n = N)
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename FixedSegmentReturnType<N>::Type(derived(), 0, n); return typename FixedSegmentReturnType<N>::Type(derived(), 0, n);
@ -1325,8 +1334,8 @@ inline typename FixedSegmentReturnType<N>::Type head(Index n = N)
/// This is the const version of head<int>(). /// This is the const version of head<int>().
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n); return typename ConstFixedSegmentReturnType<N>::Type(derived(), 0, n);
@ -1348,8 +1357,8 @@ inline typename ConstFixedSegmentReturnType<N>::Type head(Index n = N) const
/// \sa tail(NType), class Block /// \sa tail(NType), class Block
/// ///
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename FixedSegmentReturnType<N>::Type tail(Index n = N) typename FixedSegmentReturnType<N>::Type tail(Index n = N)
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename FixedSegmentReturnType<N>::Type(derived(), size() - n); return typename FixedSegmentReturnType<N>::Type(derived(), size() - n);
@ -1357,8 +1366,8 @@ inline typename FixedSegmentReturnType<N>::Type tail(Index n = N)
/// This is the const version of tail<int>. /// This is the const version of tail<int>.
template<int N> template<int N>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const
{ {
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n); return typename ConstFixedSegmentReturnType<N>::Type(derived(), size() - n);
@ -1367,18 +1376,21 @@ inline typename ConstFixedSegmentReturnType<N>::Type tail(Index n = N) const
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
/// is col-major (resp. row-major). /// is col-major (resp. row-major).
/// ///
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
InnerVectorReturnType innerVector(Index outer) InnerVectorReturnType innerVector(Index outer)
{ return InnerVectorReturnType(derived(), outer); } { return InnerVectorReturnType(derived(), outer); }
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
/// is col-major (resp. row-major). Read-only. /// is col-major (resp. row-major). Read-only.
/// ///
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const ConstInnerVectorReturnType innerVector(Index outer) const const ConstInnerVectorReturnType innerVector(Index outer) const
{ return ConstInnerVectorReturnType(derived(), outer); } { return ConstInnerVectorReturnType(derived(), outer); }
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
/// is col-major (resp. row-major). /// is col-major (resp. row-major).
/// ///
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
InnerVectorsReturnType InnerVectorsReturnType
innerVectors(Index outerStart, Index outerSize) innerVectors(Index outerStart, Index outerSize)
{ {
@ -1391,6 +1403,7 @@ innerVectors(Index outerStart, Index outerSize)
/// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this /// \returns the \a outer -th column (resp. row) of the matrix \c *this if \c *this
/// is col-major (resp. row-major). Read-only. /// is col-major (resp. row-major). Read-only.
/// ///
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const ConstInnerVectorsReturnType const ConstInnerVectorsReturnType
innerVectors(Index outerStart, Index outerSize) const innerVectors(Index outerStart, Index outerSize) const
{ {
@ -1404,7 +1417,7 @@ innerVectors(Index outerStart, Index outerSize) const
* \sa subVectors() * \sa subVectors()
*/ */
template<DirectionType Direction> template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type typename internal::conditional<Direction==Vertical,ColXpr,RowXpr>::type
subVector(Index i) subVector(Index i)
{ {
@ -1413,7 +1426,7 @@ subVector(Index i)
/** This is the const version of subVector(Index) */ /** This is the const version of subVector(Index) */
template<DirectionType Direction> template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type typename internal::conditional<Direction==Vertical,ConstColXpr,ConstRowXpr>::type
subVector(Index i) const subVector(Index i) const
{ {
@ -1424,7 +1437,7 @@ subVector(Index i) const
* \sa subVector(Index) * \sa subVector(Index)
*/ */
template<DirectionType Direction> template<DirectionType Direction>
EIGEN_DEVICE_FUNC EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Index subVectors() const Index subVectors() const
{ return (Direction==Vertical)?cols():rows(); } { return (Direction==Vertical)?cols():rows(); }