diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-05-12 17:34:46 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-05-12 17:34:46 +0000 |
commit | 678f18fce4dec90ffa97b2fb3a92d572fb64c059 (patch) | |
tree | 4f97c884205357bf63dd4692ca0060046a9385f7 /Eigen/src/Core/DiagonalMatrix.h | |
parent | f0eb3d2d3b671c46d2c3b8c48037f6f8cd0100d3 (diff) |
put inline keywords everywhere appropriate. So we don't need anymore to pass
-finline-limit=1000 to gcc to get good performance. By the way some cleanup.
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 972ef464e..030b1b732 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -62,7 +62,7 @@ class DiagonalMatrix : ei_no_assignment_operator, EIGEN_GENERIC_PUBLIC_INTERFACE(DiagonalMatrix) - DiagonalMatrix(const CoeffsVectorType& coeffs) : m_coeffs(coeffs) + inline DiagonalMatrix(const CoeffsVectorType& coeffs) : m_coeffs(coeffs) { ei_assert(CoeffsVectorType::IsVectorAtCompileTime && coeffs.size() > 0); @@ -70,10 +70,10 @@ class DiagonalMatrix : ei_no_assignment_operator, private: - int _rows() const { return m_coeffs.size(); } - int _cols() const { return m_coeffs.size(); } + inline int _rows() const { return m_coeffs.size(); } + inline int _cols() const { return m_coeffs.size(); } - const Scalar _coeff(int row, int col) const + inline const Scalar _coeff(int row, int col) const { return row == col ? m_coeffs.coeff(row) : static_cast<Scalar>(0); } @@ -92,7 +92,7 @@ class DiagonalMatrix : ei_no_assignment_operator, * \sa class DiagonalMatrix, isDiagonal() **/ template<typename Derived> -const DiagonalMatrix<Derived> +inline const DiagonalMatrix<Derived> MatrixBase<Derived>::asDiagonal() const { return DiagonalMatrix<Derived>(derived()); |