MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / getMean

Method getMean

src/benchmarks/clsparse-bench/src/statisticalTimer.cpp:202–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202double
203StatisticalTimer::getMean( sTimerID id ) const
204{
205 if( clkTicks.empty( ) )
206 return 0;
207
208 size_t N = clkTicks.at( id ).size( );
209
210 Accumulator<unsigned long long> sum = std::for_each( clkTicks.at( id ).begin(), clkTicks.at( id ).end(), Accumulator<unsigned long long>() );
211
212 return static_cast<double>( sum.acc ) / N;
213}
214
215double
216StatisticalTimer::getVariance( sTimerID id ) const

Callers 1

Calls 5

emptyMethod · 0.80
atMethod · 0.80
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected