From aaaade4b3d66d67d2c08af3372c3965e7255b2e8 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 30 May 2010 16:00:58 -0400 Subject: the Index types change. As discussed on the list (too long to explain here). --- Eigen/src/misc/Image.h | 11 +++++++---- Eigen/src/misc/Kernel.h | 11 +++++++---- Eigen/src/misc/Solve.h | 7 +++++-- 3 files changed, 19 insertions(+), 10 deletions(-) (limited to 'Eigen/src/misc') diff --git a/Eigen/src/misc/Image.h b/Eigen/src/misc/Image.h index 1d63d8143..32392fd29 100644 --- a/Eigen/src/misc/Image.h +++ b/Eigen/src/misc/Image.h @@ -48,6 +48,8 @@ template struct ei_image_retval_base { typedef _DecompositionType DecompositionType; typedef typename DecompositionType::MatrixType MatrixType; + typedef ReturnByValue Base; + typedef typename Base::Index Index; ei_image_retval_base(const DecompositionType& dec, const MatrixType& originalMatrix) : m_dec(dec), m_rank(dec.rank()), @@ -55,9 +57,9 @@ template struct ei_image_retval_base m_originalMatrix(originalMatrix) {} - inline int rows() const { return m_dec.rows(); } - inline int cols() const { return m_cols; } - inline int rank() const { return m_rank; } + inline Index rows() const { return m_dec.rows(); } + inline Index cols() const { return m_cols; } + inline Index rank() const { return m_rank; } inline const DecompositionType& dec() const { return m_dec; } inline const MatrixType& originalMatrix() const { return m_originalMatrix; } @@ -68,7 +70,7 @@ template struct ei_image_retval_base protected: const DecompositionType& m_dec; - int m_rank, m_cols; + Index m_rank, m_cols; const MatrixType& m_originalMatrix; }; @@ -76,6 +78,7 @@ template struct ei_image_retval_base typedef typename DecompositionType::MatrixType MatrixType; \ typedef typename MatrixType::Scalar Scalar; \ typedef typename MatrixType::RealScalar RealScalar; \ + typedef typename MatrixType::Index Index; \ typedef ei_image_retval_base Base; \ using Base::dec; \ using Base::originalMatrix; \ diff --git a/Eigen/src/misc/Kernel.h b/Eigen/src/misc/Kernel.h index 497b42eab..38a2d4097 100644 --- a/Eigen/src/misc/Kernel.h +++ b/Eigen/src/misc/Kernel.h @@ -49,6 +49,8 @@ template struct ei_kernel_retval_base : public ReturnByValue > { typedef _DecompositionType DecompositionType; + typedef ReturnByValue Base; + typedef typename Base::Index Index; ei_kernel_retval_base(const DecompositionType& dec) : m_dec(dec), @@ -56,9 +58,9 @@ template struct ei_kernel_retval_base m_cols(m_rank==dec.cols() ? 1 : dec.cols() - m_rank) {} - inline int rows() const { return m_dec.cols(); } - inline int cols() const { return m_cols; } - inline int rank() const { return m_rank; } + inline Index rows() const { return m_dec.cols(); } + inline Index cols() const { return m_cols; } + inline Index rank() const { return m_rank; } inline const DecompositionType& dec() const { return m_dec; } template inline void evalTo(Dest& dst) const @@ -68,13 +70,14 @@ template struct ei_kernel_retval_base protected: const DecompositionType& m_dec; - int m_rank, m_cols; + Index m_rank, m_cols; }; #define EIGEN_MAKE_KERNEL_HELPERS(DecompositionType) \ typedef typename DecompositionType::MatrixType MatrixType; \ typedef typename MatrixType::Scalar Scalar; \ typedef typename MatrixType::RealScalar RealScalar; \ + typedef typename MatrixType::Index Index; \ typedef ei_kernel_retval_base Base; \ using Base::dec; \ using Base::rank; \ diff --git a/Eigen/src/misc/Solve.h b/Eigen/src/misc/Solve.h index 028716aa2..d6fc67406 100644 --- a/Eigen/src/misc/Solve.h +++ b/Eigen/src/misc/Solve.h @@ -45,13 +45,15 @@ template struct ei_solve_retval_base { typedef typename ei_cleantype::type RhsNestedCleaned; typedef _DecompositionType DecompositionType; + typedef ReturnByValue Base; + typedef typename Base::Index Index; ei_solve_retval_base(const DecompositionType& dec, const Rhs& rhs) : m_dec(dec), m_rhs(rhs) {} - inline int rows() const { return m_dec.cols(); } - inline int cols() const { return m_rhs.cols(); } + inline Index rows() const { return m_dec.cols(); } + inline Index cols() const { return m_rhs.cols(); } inline const DecompositionType& dec() const { return m_dec; } inline const RhsNestedCleaned& rhs() const { return m_rhs; } @@ -69,6 +71,7 @@ template struct ei_solve_retval_base typedef typename DecompositionType::MatrixType MatrixType; \ typedef typename MatrixType::Scalar Scalar; \ typedef typename MatrixType::RealScalar RealScalar; \ + typedef typename MatrixType::Index Index; \ typedef ei_solve_retval_base Base; \ using Base::dec; \ using Base::rhs; \ -- cgit v1.2.3