diff options
Diffstat (limited to 'BFS/support')
-rw-r--r-- | BFS/support/params.h | 14 | ||||
-rw-r--r-- | BFS/support/timer.h | 13 |
2 files changed, 16 insertions, 11 deletions
diff --git a/BFS/support/params.h b/BFS/support/params.h index f4f12e7..960a0d0 100644 --- a/BFS/support/params.h +++ b/BFS/support/params.h @@ -20,17 +20,29 @@ static void usage() { typedef struct Params { const char* fileName; unsigned int verbosity; +#if NUMA + struct bitmask* bitmask_in; + int numa_node_cpu; +#endif } Params; static struct Params input_params(int argc, char **argv) { struct Params p; p.fileName = "data/roadNet-CA.txt"; p.verbosity = 0; +#if NUMA + p.bitmask_in = NULL; + p.numa_node_cpu = -1; +#endif int opt; - while((opt = getopt(argc, argv, "f:v:h")) >= 0) { + while((opt = getopt(argc, argv, "f:v:hA:C:")) >= 0) { switch(opt) { case 'f': p.fileName = optarg; break; case 'v': p.verbosity = atoi(optarg); break; +#if NUMA + case 'A': p.bitmask_in = numa_parse_nodestring(optarg); break; + case 'C': p.numa_node_cpu = atoi(optarg); break; +#endif case 'h': usage(); exit(0); default: PRINT_ERROR("Unrecognized option!"); diff --git a/BFS/support/timer.h b/BFS/support/timer.h index 80719cf..466ad95 100644 --- a/BFS/support/timer.h +++ b/BFS/support/timer.h @@ -6,9 +6,9 @@ #include <sys/time.h> typedef struct Timer { - struct timeval startTime[5]; - struct timeval stopTime[5]; - double time[5]; + struct timeval startTime[8]; + struct timeval stopTime[8]; + double time[8]; } Timer; static void startTimer(Timer *timer, int i, int rep) { @@ -24,11 +24,4 @@ static void stopTimer(Timer *timer, int i) { (timer->stopTime[i].tv_usec - timer->startTime[i].tv_usec); } -static void printAll(Timer *timer, int maxt) { - for (int i = 0; i <= maxt; i++) { - printf(" timer%d_us=%f", i, timer->time[i]); - } - printf("\n"); -} - #endif |