10 #ifndef EIGEN_MISC_KERNEL_H
11 #define EIGEN_MISC_KERNEL_H
22 template<
typename DecompositionType>
23 struct traits<kernel_retval_base<DecompositionType> >
28 MatrixType::ColsAtCompileTime,
33 MatrixType::MaxColsAtCompileTime,
34 MatrixType::MaxColsAtCompileTime
39 template<
typename DecompositionType_>
struct kernel_retval_base
40 :
public ReturnByValue<kernel_retval_base<DecompositionType_> >
42 typedef DecompositionType_ DecompositionType;
43 typedef ReturnByValue<kernel_retval_base>
Base;
45 explicit kernel_retval_base(
const DecompositionType& dec)
48 m_cols(m_rank==dec.
cols() ? 1 : dec.
cols() - m_rank)
51 inline Index rows()
const {
return m_dec.cols(); }
52 inline Index cols()
const {
return m_cols; }
53 inline Index rank()
const {
return m_rank; }
54 inline const DecompositionType& dec()
const {
return m_dec; }
56 template<
typename Dest>
inline void evalTo(Dest& dst)
const
58 static_cast<const kernel_retval<DecompositionType>*
>(
this)->
evalTo(dst);
62 const DecompositionType& m_dec;
68 #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \
69 typedef typename DecompositionType::MatrixType MatrixType; \
70 typedef typename MatrixType::Scalar Scalar; \
71 typedef typename MatrixType::RealScalar RealScalar; \
72 typedef Eigen::internal::kernel_retval_base<DecompositionType> Base; \
77 kernel_retval(const DecompositionType& dec) : Base(dec) {}
Matrix< float, 1, Dynamic > MatrixType
internal::traits< Derived >::Scalar Scalar
internal::dense_xpr_base< ReturnByValue >::type Base
void evalTo(Dest &dst) const
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.