make eigen2 submatrices test pass

This commit is contained in:
Benoit Jacob
2011-01-21 10:24:59 -05:00
parent cc2b7a5397
commit 5be269db88
2 changed files with 5 additions and 3 deletions

View File

@@ -111,8 +111,10 @@ template<typename MatrixType> void submatrices(const MatrixType& m)
m2.diagonal()[0] *= 3;
VERIFY_IS_APPROX(m2.diagonal()[0], static_cast<Scalar>(6) * m1.diagonal()[0]);
const int BlockRows = EIGEN_ENUM_MIN(MatrixType::RowsAtCompileTime,2);
const int BlockCols = EIGEN_ENUM_MIN(MatrixType::ColsAtCompileTime,5);
enum {
BlockRows = EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::RowsAtCompileTime,2),
BlockCols = EIGEN_SIZE_MIN_PREFER_FIXED(MatrixType::ColsAtCompileTime,5)
};
if (rows>=5 && cols>=8)
{
// test fixed block() as lvalue