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

Method Print

src/statTimer/statisticalTimer.GPU.cpp:446–664  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446void
447GpuStatTimer::Print( )
448{
449 const int tableWidth = 60;
450 const int tableHalf = tableWidth / 2;
451 const int tableThird = tableWidth / 3;
452 const int tableFourth = tableWidth / 4;
453 const int tableFifth = tableWidth / 5;
454
455 for( cl_uint id = 0; id < labelID.size( ); ++id )
456 {
457 size_t halfString = labelID[ id ].first.size( ) / 2;
458
459 // Print label of timer, in a header
460 std::cout << std::endl << std::setw( tableHalf + halfString ) << std::setfill( '=' ) << labelID[ id ].first
461 << std::setw( tableHalf - halfString ) << "=" << std::endl;
462 tout << std::setfill( _T( ' ' ) );
463
464 std::vector< StatData > mean = getMean( id );
465
466 // Print each individual dimension
467 tstringstream catLengths;
468 for( cl_uint t = 0; t < mean.size( ); ++t )
469 {
470 cl_double time = 0;
471 if( mean[ t ].kernel == NULL )
472 {
473 for( cl_uint m = 0; m < t; ++m )
474 {
475 if( mean[ m ].plHandle == mean[ t ].planX ||
476 mean[ m ].plHandle == mean[ t ].planY ||
477 mean[ m ].plHandle == mean[ t ].planZ ||
478 mean[ m ].plHandle == mean[ t ].planTX ||
479 mean[ m ].plHandle == mean[ t ].planTY ||
480 mean[ m ].plHandle == mean[ t ].planTZ ||
481 mean[ m ].plHandle == mean[ t ].planRCcopy ||
482 mean[ m ].plHandle == mean[ t ].planCopy )
483 {
484 time += mean[ m ].doubleNanoSec;
485 }
486 }
487 mean[ t ].doubleNanoSec = time;
488 }
489 else
490 {
491 time = mean[ t ].doubleNanoSec;
492 }
493 double gFlops = mean[ t ].calcFlops( ) / time;
494
495 tout << std::setw( tableFourth ) << _T( "Handle:" )
496 << std::setw( tableThird ) << mean[ t ].plHandle << std::endl;
497
498 if( mean[ t ].kernel != 0 )
499 {
500 tout << std::setw( tableFourth ) << _T( "Kernel:" )
501 << std::setw( tableThird ) << reinterpret_cast<void*>( mean[ t ].kernel ) << std::endl;
502 }
503

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
calcFlopsMethod · 0.80
commatizeFunction · 0.70

Tested by

no test coverage detected