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

Method getMean

src/clsparseTimer/clsparseTimer-device.cpp:292–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292std::vector< StatData >
293clsparseDeviceTimer::getMean( size_t id )
294{
295 // Prep the data; query openCL for the timer information
296 queryOpenCL( id );
297
298 std::vector< StatData > meanVec;
299 for( size_t s = 0; s < timerData.at( id ).size( ); ++s )
300 {
301 Accumulator< StatData > sum = std::for_each( timerData.at( id ).at( s ).begin( ), timerData.at( id ).at( s ).end( ),
302 Accumulator< StatData >( ) );
303
304 StatData tmp = timerData[ id ][ s ].front( );
305 tmp.doubleNanoSec = static_cast<cl_double>( sum.acc.deltaNanoSec ) / timerData.at( id ).at( s ).size( );
306 meanVec.push_back( tmp );
307 }
308
309 return meanVec;
310}
311
312std::vector< StatData >
313clsparseDeviceTimer::getVariance( size_t id )

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected