summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/plotbench
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-09-23 13:17:22 +0200
committerTyge Løvset <[email protected]>2022-09-23 13:17:22 +0200
commit2c83996f1ad7ac7176833d1ecb76f59120bf52cd (patch)
tree495527c129d630b67aed0d8528c70ef5aa418106 /benchmarks/plotbench
parent0ec40a5819a619b6b2777f24c555a8953e99ea9b (diff)
downloadSTC-modified-2c83996f1ad7ac7176833d1ecb76f59120bf52cd.tar.gz
STC-modified-2c83996f1ad7ac7176833d1ecb76f59120bf52cd.zip
Reverted c_forrange() macro with 3 or more args: swapped 1st and 2nd arg again.
Diffstat (limited to 'benchmarks/plotbench')
-rw-r--r--benchmarks/plotbench/cdeq_benchmark.cpp4
-rw-r--r--benchmarks/plotbench/clist_benchmark.cpp4
-rw-r--r--benchmarks/plotbench/cmap_benchmark.cpp4
-rw-r--r--benchmarks/plotbench/cpque_benchmark.cpp4
-rw-r--r--benchmarks/plotbench/csmap_benchmark.cpp4
-rw-r--r--benchmarks/plotbench/cvec_benchmark.cpp4
6 files changed, 12 insertions, 12 deletions
diff --git a/benchmarks/plotbench/cdeq_benchmark.cpp b/benchmarks/plotbench/cdeq_benchmark.cpp
index 42395778..49db3914 100644
--- a/benchmarks/plotbench/cdeq_benchmark.cpp
+++ b/benchmarks/plotbench/cdeq_benchmark.cpp
@@ -109,10 +109,10 @@ Sample test_stc_deque() {
int main(int argc, char* argv[])
{
Sample std_s[SAMPLES + 1], stc_s[SAMPLES + 1];
- c_forrange (int, i, SAMPLES) {
+ c_forrange (i, int, SAMPLES) {
std_s[i] = test_std_deque();
stc_s[i] = test_stc_deque();
- if (i > 0) c_forrange (int, j, N_TESTS) {
+ if (i > 0) c_forrange (j, int, N_TESTS) {
if (secs(std_s[i].test[j]) < secs(std_s[0].test[j])) std_s[0].test[j] = std_s[i].test[j];
if (secs(stc_s[i].test[j]) < secs(stc_s[0].test[j])) stc_s[0].test[j] = stc_s[i].test[j];
if (stc_s[i].test[j].sum != stc_s[0].test[j].sum) printf("Error in sum: test %d, sample %d\n", i, j);
diff --git a/benchmarks/plotbench/clist_benchmark.cpp b/benchmarks/plotbench/clist_benchmark.cpp
index fad44ed5..ddd1e2f0 100644
--- a/benchmarks/plotbench/clist_benchmark.cpp
+++ b/benchmarks/plotbench/clist_benchmark.cpp
@@ -106,10 +106,10 @@ Sample test_stc_forward_list() {
int main(int argc, char* argv[])
{
Sample std_s[SAMPLES + 1], stc_s[SAMPLES + 1];
- c_forrange (int, i, SAMPLES) {
+ c_forrange (i, int, SAMPLES) {
std_s[i] = test_std_forward_list();
stc_s[i] = test_stc_forward_list();
- if (i > 0) c_forrange (int, j, N_TESTS) {
+ if (i > 0) c_forrange (j, int, N_TESTS) {
if (secs(std_s[i].test[j]) < secs(std_s[0].test[j])) std_s[0].test[j] = std_s[i].test[j];
if (secs(stc_s[i].test[j]) < secs(stc_s[0].test[j])) stc_s[0].test[j] = stc_s[i].test[j];
if (stc_s[i].test[j].sum != stc_s[0].test[j].sum) printf("Error in sum: test %d, sample %d\n", i, j);
diff --git a/benchmarks/plotbench/cmap_benchmark.cpp b/benchmarks/plotbench/cmap_benchmark.cpp
index b73f6bd1..cf20c927 100644
--- a/benchmarks/plotbench/cmap_benchmark.cpp
+++ b/benchmarks/plotbench/cmap_benchmark.cpp
@@ -113,10 +113,10 @@ Sample test_stc_unordered_map() {
int main(int argc, char* argv[])
{
Sample std_s[SAMPLES + 1], stc_s[SAMPLES + 1];
- c_forrange (int, i, SAMPLES) {
+ c_forrange (i, int, SAMPLES) {
std_s[i] = test_std_unordered_map();
stc_s[i] = test_stc_unordered_map();
- if (i > 0) c_forrange (int, j, N_TESTS) {
+ if (i > 0) c_forrange (j, int, N_TESTS) {
if (secs(std_s[i].test[j]) < secs(std_s[0].test[j])) std_s[0].test[j] = std_s[i].test[j];
if (secs(stc_s[i].test[j]) < secs(stc_s[0].test[j])) stc_s[0].test[j] = stc_s[i].test[j];
if (stc_s[i].test[j].sum != stc_s[0].test[j].sum) printf("Error in sum: test %d, sample %d\n", i, j);
diff --git a/benchmarks/plotbench/cpque_benchmark.cpp b/benchmarks/plotbench/cpque_benchmark.cpp
index 9e2f8d18..ca28082b 100644
--- a/benchmarks/plotbench/cpque_benchmark.cpp
+++ b/benchmarks/plotbench/cpque_benchmark.cpp
@@ -50,12 +50,12 @@ void stc_test()
printf("Built priority queue: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC);
printf("%g ", *cpque_f_top(&pq));
- c_forrange (int, i, M) {
+ c_forrange (i, int, M) {
cpque_f_pop(&pq);
}
start = clock();
- c_forrange (int, i, M, N)
+ c_forrange (i, int, M, N)
cpque_f_pop(&pq);
printf("\npopped PQ: %f secs\n", (clock() - start) / (float) CLOCKS_PER_SEC);
}
diff --git a/benchmarks/plotbench/csmap_benchmark.cpp b/benchmarks/plotbench/csmap_benchmark.cpp
index 56a0e7d3..7e6d62c6 100644
--- a/benchmarks/plotbench/csmap_benchmark.cpp
+++ b/benchmarks/plotbench/csmap_benchmark.cpp
@@ -114,10 +114,10 @@ Sample test_stc_map() {
int main(int argc, char* argv[])
{
Sample std_s[SAMPLES + 1], stc_s[SAMPLES + 1];
- c_forrange (int, i, SAMPLES) {
+ c_forrange (i, int, SAMPLES) {
std_s[i] = test_std_map();
stc_s[i] = test_stc_map();
- if (i > 0) c_forrange (int, j, N_TESTS) {
+ if (i > 0) c_forrange (j, int, N_TESTS) {
if (secs(std_s[i].test[j]) < secs(std_s[0].test[j])) std_s[0].test[j] = std_s[i].test[j];
if (secs(stc_s[i].test[j]) < secs(stc_s[0].test[j])) stc_s[0].test[j] = stc_s[i].test[j];
if (stc_s[i].test[j].sum != stc_s[0].test[j].sum) printf("Error in sum: test %d, sample %d\n", i, j);
diff --git a/benchmarks/plotbench/cvec_benchmark.cpp b/benchmarks/plotbench/cvec_benchmark.cpp
index 62c4f9c8..a0faf679 100644
--- a/benchmarks/plotbench/cvec_benchmark.cpp
+++ b/benchmarks/plotbench/cvec_benchmark.cpp
@@ -105,10 +105,10 @@ Sample test_stc_vector() {
int main(int argc, char* argv[])
{
Sample std_s[SAMPLES + 1] = {{NULL}}, stc_s[SAMPLES + 1] = {{NULL}};
- c_forrange (int, i, SAMPLES) {
+ c_forrange (i, int, SAMPLES) {
std_s[i] = test_std_vector();
stc_s[i] = test_stc_vector();
- if (i > 0) c_forrange (int, j, N_TESTS) {
+ if (i > 0) c_forrange (j, int, N_TESTS) {
if (secs(std_s[i].test[j]) < secs(std_s[0].test[j])) std_s[0].test[j] = std_s[i].test[j];
if (secs(stc_s[i].test[j]) < secs(stc_s[0].test[j])) stc_s[0].test[j] = stc_s[i].test[j];
if (stc_s[i].test[j].sum != stc_s[0].test[j].sum) printf("Error in sum: test %d, sample %d\n", i, j);