From cfe03c23917cee3af4e039c6e323ae50df25ca08 Mon Sep 17 00:00:00 2001 From: Drew Zagieboylo Date: Mon, 5 May 2014 10:59:09 -0700 Subject: unrolled clogMem and made minor tweak to sdisorder --- benchmarks/common/util.h | 8 +++++--- benchmarks/sdisorder/sdisorder.c | 8 ++++---- 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); } -- cgit v1.1