diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-10-06 11:32:02 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-10-06 11:32:02 +0200 |
commit | 6100d1ae64999b0cf0c37712765c2f558d1922a0 (patch) | |
tree | bfc6f1e2529246d392ffb54fada63070f24b8f9d /test/sparse_ref.cpp | |
parent | 1879917d355a473401f27e903aa30422d4934c41 (diff) |
Improve counting of sparse temporaries
Diffstat (limited to 'test/sparse_ref.cpp')
-rw-r--r-- | test/sparse_ref.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/sparse_ref.cpp b/test/sparse_ref.cpp index d173ee658..93fb5efe7 100644 --- a/test/sparse_ref.cpp +++ b/test/sparse_ref.cpp @@ -64,6 +64,7 @@ void call_ref() const SparseMatrix<float>& Ac(A); Block<SparseMatrix<float> > Ab(A,0,1, 3,3); const Block<SparseMatrix<float> > Abc(A,0,1,3,3); + SparseMatrix<float> AA = A*A; VERIFY_EVALUATION_COUNT( call_ref_1(A, A), 0); @@ -80,8 +81,8 @@ void call_ref() VERIFY_EVALUATION_COUNT( call_ref_3(B, B), 1); VERIFY_EVALUATION_COUNT( call_ref_2(B.transpose(), B.transpose()), 0); VERIFY_EVALUATION_COUNT( call_ref_3(B.transpose(), B.transpose()), 0); - VERIFY_EVALUATION_COUNT( call_ref_2(A*A, A*A), 1); - VERIFY_EVALUATION_COUNT( call_ref_3(A*A, A*A), 1); + VERIFY_EVALUATION_COUNT( call_ref_2(A*A, AA), 1); + VERIFY_EVALUATION_COUNT( call_ref_3(A*A, AA), 1); VERIFY(!C.isCompressed()); VERIFY_EVALUATION_COUNT( call_ref_3(C, C), 1); |