Skip to content

Commit

Permalink
Using a boolean for strict.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Nov 19, 2011
1 parent 9a2eef3 commit e801f25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/experiment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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 *));
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/experiment.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Experiment {

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;
Expand Down

0 comments on commit e801f25

Please sign in to comment.