summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/plotbench/cdeq_benchmark.cpp
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-07-07 08:33:14 +0200
committerTyge Løvset <[email protected]>2022-07-07 08:33:14 +0200
commitd108c705ae0b51874f1d18b8916466bdc5830415 (patch)
treed6356a0c46d79aacee0e806ccb90ce50c6610421 /benchmarks/plotbench/cdeq_benchmark.cpp
parentb94170eefce899d0b236804681d77fe026956fd9 (diff)
downloadSTC-modified-d108c705ae0b51874f1d18b8916466bdc5830415.tar.gz
STC-modified-d108c705ae0b51874f1d18b8916466bdc5830415.zip
Added missing file: unordered_dense.h. Added -Wall -pedantic to benchmarks and fixed warnings. Thanks to ktprime for reporting.
Diffstat (limited to 'benchmarks/plotbench/cdeq_benchmark.cpp')
-rw-r--r--benchmarks/plotbench/cdeq_benchmark.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/benchmarks/plotbench/cdeq_benchmark.cpp b/benchmarks/plotbench/cdeq_benchmark.cpp
index 72884e78..49db3914 100644
--- a/benchmarks/plotbench/cdeq_benchmark.cpp
+++ b/benchmarks/plotbench/cdeq_benchmark.cpp
@@ -121,10 +121,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);
}