remove all the _Order mechanics, now we are always traversing matrices in

column-major order, even if storage is row-major. Benchmark showed that adapting
the traversal order to the storage order brought no benefit.

Also do some cleanup after Gael's big patch.
This commit is contained in:
Benoit Jacob
2008-01-06 13:57:29 +00:00
parent 495eb7053a
commit aaf889e72b
25 changed files with 37 additions and 76 deletions

View File

@@ -33,20 +33,15 @@ template<typename MatrixType> class Identity : NoOperatorEquals,
typedef typename MatrixType::Scalar Scalar;
friend class MatrixBase<Scalar, Identity<MatrixType> >;
Identity(int rows) : m_rows(rows)
{
assert(rows > 0 && _RowsAtCompileTime == _ColsAtCompileTime);
}
static const TraversalOrder Order = Indifferent;
static const int RowsAtCompileTime = MatrixType::RowsAtCompileTime,
ColsAtCompileTime = MatrixType::ColsAtCompileTime;
Identity(int rows) : m_rows(rows)
{
assert(rows > 0 && RowsAtCompileTime == ColsAtCompileTime);
}
private:
static const TraversalOrder _Order = Indifferent;
static const int _RowsAtCompileTime = MatrixType::RowsAtCompileTime,
_ColsAtCompileTime = MatrixType::ColsAtCompileTime;
const Identity& _ref() const { return *this; }
int _rows() const { return m_rows; }
int _cols() const { return m_rows; }