diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-07-23 21:00:10 +0200 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-07-25 22:28:44 +0200 |
commit | 6a8b9e24f2428c140dac97d8279cbb99d051c59d (patch) | |
tree | 7405472387c4852431abd8151faddc341ca64457 /src/tuning/tuning.cpp | |
parent | f8fb707fa440d1ce8b319bec8efe3c20d21dcd37 (diff) |
Added code to report the average tuning results
Diffstat (limited to 'src/tuning/tuning.cpp')
-rw-r--r-- | src/tuning/tuning.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/tuning/tuning.cpp b/src/tuning/tuning.cpp index 216f4b31..822f8851 100644 --- a/src/tuning/tuning.cpp +++ b/src/tuning/tuning.cpp @@ -342,8 +342,17 @@ void Tuner(int argc, char* argv[], const int V, const auto best_time_ms = best_configuration->score; if (best_time_ms == 0.0) { return; } - // Also prints the performance of the best-case in terms of GB/s or GFLOPS + // Computes and prints some other statistics + auto average_ms = 0.0; + for (const auto result : results) { average_ms += result.score; } + average_ms /= results.size(); printf("\n"); + printf("* Got average result of %.2lf ms", average_ms); + printf(": %.1lf %s\n", settings.metric_amount / (average_ms * 1.0e6), + settings.performance_unit.c_str()); + + + // Also prints the performance of the best-case in terms of GB/s or GFLOPS printf("* Found best result %.2lf ms", best_time_ms); printf(": %.1lf %s\n", settings.metric_amount / (best_time_ms * 1.0e6), settings.performance_unit.c_str()); |