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

Method Print

src/clsparseTimer/clsparseTimer-host.cpp:375–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373}
374
375void
376clsparseHostTimer::Print( cl_ulong flopCount, std::string unit )
377{
378 const int tableWidth = 60;
379 const int tableHalf = tableWidth / 2;
380 const int tableThird = tableWidth / 3;
381 const int tableFourth = tableWidth / 4;
382 const int tableFifth = tableWidth / 5;
383
384 for( cl_uint id = 0; id < labelID.size( ); ++id )
385 {
386 size_t halfString = labelID[ id ].first.size( ) / 2;
387
388 // Print label of timer, in a header
389 std::cout << std::endl << std::setw( tableHalf + halfString ) << std::setfill( '=' ) << labelID[ id ].first
390 << std::setw( tableHalf - halfString ) << "=" << std::endl;
391 std::cout << std::setfill( ' ' );
392
393 cl_double time = getAverageTime( id ) * 1e9;
394 cl_double gFlops = flopCount / time;
395
396 std::cout << std::setw( tableFourth ) << unit << ":"
397 << std::setw( 2 * tableFourth ) << gFlops << std::endl;
398 std::cout << std::setw( tableFourth ) << "Time (ns):"
399 << std::setw( 3 * tableFourth ) << commatize( static_cast<cl_ulong>( time ) ) << std::endl;
400 std::cout << std::endl;
401 }
402}
403
404// Defining an output print operator
405std::ostream&

Callers 9

cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45
cleanupMethod · 0.45

Calls 2

commatizeFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected