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

Method getMean

src/clsparseTimer/clsparseTimer-host.cpp:252–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252cl_double
253clsparseHostTimer::getMean( size_t id ) const
254{
255 if( clkTicks.empty( ) )
256 return 0;
257
258 size_t N = clkTicks.at( id ).size( );
259
260 Accumulator<cl_ulong> sum = std::for_each( clkTicks.at( id ).begin( ), clkTicks.at( id ).end( ), Accumulator<cl_ulong>( ) );
261
262 return static_cast<cl_double>( sum.acc ) / N;
263}
264
265cl_double
266clsparseHostTimer::getVariance( size_t 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