aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/common
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/common')
-rw-r--r--benchmarks/common/util.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/benchmarks/common/util.h b/benchmarks/common/util.h
index d0a3805..ffbaa98 100644
--- a/benchmarks/common/util.h
+++ b/benchmarks/common/util.h
@@ -114,9 +114,11 @@ void clogMem(int len, int step, int its)
int arr[len];
int j = its;
while(j > 0) {
- for (int i = 0; i < len; i += step) {
- int idx = i % len;
- arr[idx] = arr[idx] + 1;
+ for (int i = 0; i < len; i += step<<2) {
+ for(int k = 0; k < 4; k++) {
+ int idx = (i + k*step) % len;
+ arr[idx] = arr[idx] + 1;
+ }
}
j -= 1;
}