MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / clblasRegPerf

Method clblasRegPerf

src/tests/performance/PerformanceRecorder.cpp:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void
55PerformanceRecorder::clblasRegPerf(
56 BlasFunction fn,
57 unsigned long us,
58 problem_size_t size)
59{
60 int id = static_cast<int>(fn);
61
62 records_[id].clblasGFlops += ((gflops_t)size / us) / 1000;
63 records_[id].clblasGbps += ((gbps_t)size / us) / 1000;
64
65 if( (functionBlasLevel(static_cast<BlasFunction>(fn)) == 2) //display metrics in GBps if it is a BLAS-2/1 functio
66 || (functionBlasLevel(static_cast<BlasFunction>(fn)) == 1) )
67 {
68 std::cerr << "clBlas GBPS : " << (((gbps_t)size / us) / 1000) << std::endl << std::endl << std::endl;
69 }
70 else
71 {
72 std::cerr << "clBlas GFLOPS : " << (((gflops_t)size / us) / 1000) << std::endl << std::endl << std::endl;
73 }
74
75 records_[id].clblasNrRuns++;
76}
77
78void
79PerformanceRecorder::regTimeRatio(BlasFunction fn, double ratio)

Callers 1

runMethod · 0.80

Calls 1

functionBlasLevelFunction · 0.85

Tested by

no test coverage detected