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

Method queryOpenCL

src/statTimer/statisticalTimer.GPU.cpp:274–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272}
273
274void GpuStatTimer::queryOpenCL( size_t id )
275{
276 for( size_t s = 0; s < timerData.at( id ).size( ); ++s )
277 {
278 for( size_t n = 0; n < timerData.at( id ).at( s ).size( ); ++n )
279 {
280 StatData& sd = timerData[ id ][ s ][ n ];
281
282 cl_ulong profStart, profEnd = 0;
283 sd.deltaNanoSec = 0;
284
285 for( size_t i = 0; i < sd.outEvents.size( ); ++i )
286 {
287 if( ::clGetEventProfilingInfo( sd.outEvents[ i ], CL_PROFILING_COMMAND_START, sizeof( cl_ulong ), &profStart, NULL ) != CL_SUCCESS )
288 {
289 profStart = 0;
290 }
291
292 if( ::clGetEventProfilingInfo( sd.outEvents[ i ], CL_PROFILING_COMMAND_END, sizeof( cl_ulong ), &profEnd, NULL ) != CL_SUCCESS )
293 {
294 profEnd = 0;
295 }
296 sd.deltaNanoSec += (profEnd - profStart);
297 }
298
299 sd.doubleNanoSec = static_cast< cl_double >( sd.deltaNanoSec );
300 }
301 }
302}
303
304std::vector< StatData >
305GpuStatTimer::getMean( size_t id )

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected