play with inlining to get better performance when the compiler is not asked to optimize

This commit is contained in:
Benoit Jacob
2007-12-11 13:14:14 +00:00
parent 8117c9aa83
commit 936b0de9cc
16 changed files with 71 additions and 63 deletions

View File

@@ -40,21 +40,21 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols> >,
static const int RowsAtCompileTime = _Rows, ColsAtCompileTime = _Cols;
const Scalar* array() const
const Scalar* array() const EIGEN_ALWAYS_INLINE
{ return Storage::m_array; }
Scalar* array()
Scalar* array() EIGEN_ALWAYS_INLINE
{ return Storage::m_array; }
private:
Ref _ref() const { return Ref(*this); }
const Scalar& _read(int row, int col) const
const Scalar& _read(int row, int col) const EIGEN_ALWAYS_INLINE
{
return array()[row + col * Storage::_rows()];
}
Scalar& _write(int row, int col)
Scalar& _write(int row, int col) EIGEN_ALWAYS_INLINE
{
return array()[row + col * Storage::_rows()];
}