diff options
author | Tim Besard <tim.besard@gmail.com> | 2011-11-19 15:39:35 +0100 |
---|---|---|
committer | Tim Besard <tim.besard@gmail.com> | 2011-11-19 15:39:35 +0100 |
commit | e801f2560b864cd52b352481c6de1a35508c8271 (patch) | |
tree | 018ff9a364431f74e7ff8428d87bc86507a3185f | |
parent | 9a2eef3b9deabcd3c368cb9562485fe2dff05ec1 (diff) |
Using a boolean for strict.
-rw-r--r-- | src/experiment.cpp | 10 | ||||
-rw-r--r-- | src/experiment.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/experiment.cpp b/src/experiment.cpp index a156322..4bf4eff 100644 --- a/src/experiment.cpp +++ b/src/experiment.cpp @@ -34,7 +34,7 @@ // Experiment::Experiment() : - strict (0), + strict (false), pointer_size (DEFAULT_POINTER_SIZE), bytes_per_line (DEFAULT_BYTES_PER_LINE), links_per_line (DEFAULT_LINKS_PER_LINE), @@ -101,7 +101,7 @@ int Experiment::parse_args(int argc, char* argv[]) { for (int i = 1; i < argc; i++) { if (strcasecmp(argv[i], "-x") == 0 || strcasecmp(argv[i], "--strict") == 0) { - this->strict = 1; + this->strict = true; } else if (strcasecmp(argv[i], "-s") == 0 || strcasecmp(argv[i], "--seconds") == 0) { i++; @@ -638,7 +638,7 @@ void Experiment::alloc_map() { } void Experiment::print() { - printf("strict = %d\n", strict); + printf("strict = %s\n", strict?"yes":"no"); printf("pointer_size = %d\n", pointer_size); printf("sizeof(Chain) = %d\n", sizeof(Chain)); printf("sizeof(Chain *) = %d\n", sizeof(Chain *)); @@ -655,8 +655,8 @@ void Experiment::print() { printf("bytes_per_thread = %d\n", bytes_per_thread); printf("num_threads = %d\n", num_threads); printf("bytes_per_test = %d\n", bytes_per_test); - printf("busy cycles = %d\n", loop_length); - printf("prefetch = %d\n", prefetch); + printf("loop length = %d\n", loop_length); + printf("prefetch = %s\n", prefetch?"yes":"no"); printf("iterations = %d\n", iterations); printf("experiments = %d\n", experiments); printf("access_pattern = %d\n", access_pattern); diff --git a/src/experiment.h b/src/experiment.h index 3f6d0b1..5ede451 100644 --- a/src/experiment.h +++ b/src/experiment.h @@ -80,7 +80,7 @@ public: char** random_state; // random state for each thread - int strict; // strictly adhere to user input, or fail + bool strict; // strictly adhere to user input, or fail const static int32 DEFAULT_POINTER_SIZE = sizeof(Chain); const static int32 DEFAULT_BYTES_PER_LINE = 64; |