MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / getVariance

Method getVariance

src/statTimer/statisticalTimer.GPU.cpp:324–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324std::vector< StatData >
325GpuStatTimer::getVariance( size_t id )
326{
327 std::vector< StatData > variance = getMean( id );
328
329 for( cl_uint v = 0; v < variance.size( ); ++v )
330 {
331 double sum = 0;
332 for( cl_uint n = 0; n < timerData[ id ][ v ].size( ); ++n )
333 {
334 cl_double diff = static_cast< cl_double >( timerData[ id ][ v ][ n ].deltaNanoSec ) - variance[ v ].doubleNanoSec;
335 diff *= diff;
336 sum += diff;
337 }
338
339 variance[ v ].doubleNanoSec = sum / timerData[ id ][ v ].size( );
340 }
341
342 return variance;
343}
344
345std::vector< StatData >
346GpuStatTimer::getStdDev( size_t id )

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected