aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Zagieboylo <dzag1600@berkeley.edu>2014-05-05 10:59:09 -0700
committerDrew Zagieboylo <dzag1600@berkeley.edu>2014-05-05 10:59:09 -0700
commitcfe03c23917cee3af4e039c6e323ae50df25ca08 (patch)
tree24a6825d161418128d56207fa76b6ef9d04f2ddf
parent4fe221d4423507a8b3568e1cb361dcdb20801983 (diff)
downloadriscv-tests-rekall.zip
riscv-tests-rekall.tar.gz
riscv-tests-rekall.tar.bz2
unrolled clogMem and made minor tweak to sdisorderrekall
-rw-r--r--benchmarks/common/util.h8
-rw-r--r--benchmarks/sdisorder/sdisorder.c8
2 files changed, 9 insertions, 7 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;
}
diff --git a/benchmarks/sdisorder/sdisorder.c b/benchmarks/sdisorder/sdisorder.c
index 8698c77..2cd5373 100644
--- a/benchmarks/sdisorder/sdisorder.c
+++ b/benchmarks/sdisorder/sdisorder.c
@@ -6,7 +6,7 @@
#ifndef MLP
- #define MLP 32
+ #define MLP 256
#endif
#ifndef STEP
#define STEP 16
@@ -70,10 +70,10 @@ void thread_entry(int cid, int nc)
int main(int argc, char* argv[]) {
- uint num_iters = 1;
+ uint num_iters = 2;
uint length = 1<<16;
uint randomize = 0;
-
+ uint result = 0;
uint stream[length];
InitStream(stream, length);
@@ -81,6 +81,6 @@ int main(int argc, char* argv[]) {
ShuffleStream(stream, length);
}
- randomize = Chase(stream, length, num_iters);
+ result = Chase(stream, length, num_iters);
}