Give the axe to the aliasing system.

Improve the evaluation system instead.
This commit is contained in:
Benoit Jacob
2007-09-26 14:06:26 +00:00
parent 55227b1f63
commit a2dd9dd6f9
11 changed files with 29 additions and 95 deletions

View File

@@ -38,7 +38,7 @@ template<typename MatrixType> void matrixManip(const MatrixType& m)
a.row(i) = b.row(i);
a.row(i) += b.row(i);
a.minor(i, j) = b.block(1, rows-1, 1, cols-1);
//a.alias().minor(i, j) -= a.block(1, rows-1, 1, cols-1);
a.minor(i, j) -= eval(a.block(1, rows-1, 1, cols-1));
}
void EigenTest::testMatrixManip()

View File

@@ -44,10 +44,9 @@ template<typename MatrixType1,
a = b;
a = b + c;
a = s * (b - c);
a.alias() = a + b;
a = eval(a + b);
a += b;
a.alias() += b;
a -= b + b;
MatrixType1 d(rows1, cols1);

View File

@@ -42,11 +42,11 @@ template<typename VectorType> void vectorOps(const VectorType& v)
a = b;
a = b + c;
a = s * (b - c);
a.alias() = a + b;
a = eval(s * (b - c));
a += b;
a += b + b;
a.alias() += a + a;
a += eval(a + a);
}
void EigenTest::testVectorOps()