From d108c705ae0b51874f1d18b8916466bdc5830415 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 7 Jul 2022 08:33:14 +0200 Subject: Added missing file: unordered_dense.h. Added -Wall -pedantic to benchmarks and fixed warnings. Thanks to ktprime for reporting. --- benchmarks/plotbench/cmap_benchmark.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'benchmarks/plotbench/cmap_benchmark.cpp') diff --git a/benchmarks/plotbench/cmap_benchmark.cpp b/benchmarks/plotbench/cmap_benchmark.cpp index 4304db52..cf20c927 100644 --- a/benchmarks/plotbench/cmap_benchmark.cpp +++ b/benchmarks/plotbench/cmap_benchmark.cpp @@ -125,10 +125,18 @@ int main(int argc, char* argv[]) const char* comp = argc > 1 ? argv[1] : "test"; bool header = (argc > 2 && argv[2][0] == '1'); float std_sum = 0, stc_sum = 0; - c_forrange (j, N_TESTS) { std_sum += secs(std_s[0].test[j]); stc_sum += secs(stc_s[0].test[j]); } + + c_forrange (j, N_TESTS) { + std_sum += secs(std_s[0].test[j]); + stc_sum += secs(stc_s[0].test[j]); + } if (header) printf("Compiler,Library,C,Method,Seconds,Ratio\n"); - c_forrange (j, N_TESTS) printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, std_s[0].name, N, operations[j], secs(std_s[0].test[j]), 1.0f); - printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, std_s[0].name, N, "total", std_sum, 1.0f); - c_forrange (j, N_TESTS) printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, stc_s[0].name, N, operations[j], secs(stc_s[0].test[j]), secs(std_s[0].test[j]) ? secs(stc_s[0].test[j])/secs(std_s[0].test[j]) : 1.0f); - printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, stc_s[0].name, N, "total", stc_sum, stc_sum/std_sum); + + c_forrange (j, N_TESTS) + printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, std_s[0].name, N, operations[j], secs(std_s[0].test[j]), 1.0f); + printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, std_s[0].name, N, "total", std_sum, 1.0f); + + c_forrange (j, N_TESTS) + printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, stc_s[0].name, N, operations[j], secs(stc_s[0].test[j]), secs(std_s[0].test[j]) ? secs(stc_s[0].test[j])/secs(std_s[0].test[j]) : 1.0f); + printf("%s,%s n:%d,%s,%.3f,%.3f\n", comp, stc_s[0].name, N, "total", stc_sum, stc_sum/std_sum); } \ No newline at end of file -- cgit v1.2.3