diff options
Diffstat (limited to 'Microbenchmarks/CPU-DPU/support/params.h')
-rw-r--r-- | Microbenchmarks/CPU-DPU/support/params.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Microbenchmarks/CPU-DPU/support/params.h b/Microbenchmarks/CPU-DPU/support/params.h index 1ecf71d..3bb1535 100644 --- a/Microbenchmarks/CPU-DPU/support/params.h +++ b/Microbenchmarks/CPU-DPU/support/params.h @@ -7,6 +7,7 @@ typedef struct Params { unsigned int input_size; unsigned int n_threads; unsigned int n_nops; + unsigned int n_instr; int n_warmup; int n_reps; int exp; @@ -26,6 +27,7 @@ static void usage() { "\n -i <I> input size (default=8K elements)" "\n -n <N> number of threads per pool (default=8)" "\n -N <N> number of nops in dpu task (default=0)" + "\n -I <N> number of instructions in dpu binary (default=0)" "\n"); } @@ -34,12 +36,13 @@ struct Params input_params(int argc, char **argv) { p.input_size = 8 << 10; p.n_threads = 8; p.n_nops = 0; + p.n_instr = 0; p.n_warmup = 1; p.n_reps = 3; p.exp = 0; int opt; - while((opt = getopt(argc, argv, "hi:n:w:e:x:N:")) >= 0) { + while((opt = getopt(argc, argv, "hi:n:w:e:x:N:I:")) >= 0) { switch(opt) { case 'h': usage(); @@ -48,6 +51,7 @@ struct Params input_params(int argc, char **argv) { case 'i': p.input_size = atoi(optarg); break; case 'n': p.n_threads = atoi(optarg); break; case 'N': p.n_nops = atoi(optarg); break; + case 'I': p.n_instr = atoi(optarg); break; case 'w': p.n_warmup = atoi(optarg); break; case 'e': p.n_reps = atoi(optarg); break; case 'x': p.exp = atoi(optarg); break; |