diff --git a/test/stressVector.cxx b/test/stressVector.cxx index a1501b3924034d45f226e6ef5705779ddbe25abd..37179e28627367ce1e173761b679766d1ccfd9e8 100644 --- a/test/stressVector.cxx +++ b/test/stressVector.cxx @@ -192,7 +192,11 @@ double testAddition( const std::vector<V *> & dataV, TStopwatch & tim, double& t for (unsigned int j = i +1; j < n; ++j) { V & v2 = *(dataV[j]); V v3 = v1 + v2; - tot += v3.E(); + if (i % 1) { + tot += v3.E(); + } else { + tot -= v3.E(); + } } } tim.Stop(); @@ -210,7 +214,11 @@ double testScale( const std::vector<V *> & dataV, TStopwatch & tim, double& t, V & v1 = *(dataV[i]); // scale v1 = 2.0*v1; - tot += v1.E(); + if (i % 1) { + tot += v1.E(); + } else { + tot -= v1.E(); + } } tim.Stop(); print(tim,s); @@ -247,7 +255,11 @@ double testDeltaR( const std::vector<V *> & dataV, TStopwatch & tim, double& t, for (unsigned int j = i +1; j < n; ++j) { V & v2 = *(dataV[j]); double delta = VectorUtil::DeltaR(v1,v2); - tot += delta; + if (i % 1) { + tot += delta; + } else { + tot -= delta; + } } } tim.Stop();