mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
change derived classes methods from "private:_method()"
to "public:method()" i.e. reimplementing the generic method() from MatrixBase. improves compilation speed by 7%, reduces almost by half the call depth of trivial functions, making gcc errors and application backtraces nicer...
This commit is contained in:
@@ -68,12 +68,10 @@ class DiagonalMatrix : ei_no_assignment_operator,
|
||||
&& coeffs.size() > 0);
|
||||
}
|
||||
|
||||
private:
|
||||
inline int rows() const { return m_coeffs.size(); }
|
||||
inline int cols() const { return m_coeffs.size(); }
|
||||
|
||||
inline int _rows() const { return m_coeffs.size(); }
|
||||
inline int _cols() const { return m_coeffs.size(); }
|
||||
|
||||
inline 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user