Fixed warning.

This commit is contained in:
Hauke Heibel 2010-02-10 18:00:36 +01:00
parent 0ca67afe6a
commit d0e8342a04

View File

@ -110,11 +110,11 @@ template<typename MatrixType> void product_notemporary(const MatrixType& m)
VERIFY_EVALUATION_COUNT( m3.noalias() = m1.block(r0,r0,r1,r1).template triangularView<UnitUpper>() * m2.block(r0,c0,r1,c1), 1);
// Zero temporaries for lazy products ...
VERIFY_EVALUATION_COUNT( Scalar tmp = Scalar(RealScalar(1)) / (m3.transpose().lazyProduct(m3)).diagonal().sum(), 0 );
VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) / (m3.transpose().lazyProduct(m3)).diagonal().sum(), 0 );
// ... and one temporary for even deeply (>=2) nested products
VERIFY_EVALUATION_COUNT( Scalar tmp = Scalar(RealScalar(1)) / (m3.transpose() * m3).diagonal().sum(), 1 );
VERIFY_EVALUATION_COUNT( Scalar tmp = Scalar(RealScalar(1)) / (m3.transpose() * m3).diagonal().array().abs().sum(), 1 );
VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) / (m3.transpose() * m3).diagonal().sum(), 1 );
VERIFY_EVALUATION_COUNT( Scalar tmp = 0; tmp += Scalar(RealScalar(1)) / (m3.transpose() * m3).diagonal().array().abs().sum(), 1 );
// Zero temporaries for ... CoeffBasedProductMode
// - does not work with GCC because of the <..>, we'ld need variadic macros ...