diff options
author | Tim Besard <tim.besard@gmail.com> | 2011-11-19 16:58:56 +0100 |
---|---|---|
committer | Tim Besard <tim.besard@gmail.com> | 2011-11-19 16:58:56 +0100 |
commit | 393401b50f728ff5dc7a5d29c9c976eaff6a2a26 (patch) | |
tree | d8c3e71a84d88ed81030a44cf6a527a6589e2042 /src/experiment.h | |
parent | 365dfd66a5e1fccf344d852b659e229c6c1e31c3 (diff) |
Support for different prefetching hints.
Diffstat (limited to 'src/experiment.h')
-rw-r--r-- | src/experiment.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/experiment.h b/src/experiment.h index 5ede451..539e96a 100644 --- a/src/experiment.h +++ b/src/experiment.h @@ -54,12 +54,14 @@ public: int64 num_threads; // number of threads in the experiment int64 bytes_per_test; // test working set size (bytes) int64 loop_length; // length of the inner loop (cycles) - bool prefetch; // use of prefetching float seconds; // number of seconds per experiment int64 iterations; // number of iterations per experiment int64 experiments; // number of experiments per test + enum { NONE, T0, T1, T2, NTA } + prefetch_hint; // use of prefetching + enum { CSV, BOTH, HEADER, TABLE } output_mode; // results output mode @@ -101,9 +103,6 @@ public: const static int32 DEFAULT_ITERATIONS = 0; const static int32 DEFAULT_EXPERIMENTS = 1; - const static int32 DEFAULT_OUTPUT_MODE = 1; - const static bool DEFAULT_PREFETCH = false; - void alloc_local(); void alloc_xor(); void alloc_add(); @@ -114,4 +113,20 @@ public: private: }; + +inline const char* prefetch_hint_string(int32 prefetch_hint) { + switch (prefetch_hint) { + case Experiment::NONE: + return "none"; + case Experiment::T0: + return "t0"; + case Experiment::T1: + return "t1"; + case Experiment::T2: + return "t2"; + case Experiment::NTA: + return "nta"; + } +} + #endif |