From ee63e15e2cad25d8acd0ac6ba6dc9d7a84f74f6c Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sat, 29 Sep 2007 08:28:36 +0000 Subject: make matrix multiplication do immediate evaluation; add lazyMul() for the old behaviour some reorganization, especially in MatrixStorage start playing with loop unrolling, always_inline, and __restrict__ --- src/internal/Matrix.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/internal/Matrix.h') diff --git a/src/internal/Matrix.h b/src/internal/Matrix.h index 738cc9f6b..faed649c2 100644 --- a/src/internal/Matrix.h +++ b/src/internal/Matrix.h @@ -44,22 +44,22 @@ class EiMatrix : public EiObject<_Scalar, EiMatrix<_Scalar, _Rows, _Cols> >, static const int RowsAtCompileTime = _Rows, ColsAtCompileTime = _Cols; - const Scalar* array() const + const Scalar* EI_RESTRICT array() const { return Storage::m_array; } - Scalar* array() + Scalar* EI_RESTRICT array() { return Storage::m_array; } private: Ref _ref() const { return Ref(*const_cast(this)); } - const Scalar& _read(int row, int col = 0) const + const Scalar& EI_RESTRICT _read(int row, int col = 0) const { EI_CHECK_RANGES(*this, row, col); return array()[row + col * Storage::_rows()]; } - Scalar& _write(int row, int col = 0) + Scalar& EI_RESTRICT _write(int row, int col = 0) { EI_CHECK_RANGES(*this, row, col); return array()[row + col * Storage::_rows()]; -- cgit v1.2.3