- Timestamp:
- Aug 11, 2020, 3:00:21 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- cd02108
- Parents:
- 7f6e9eb
- Location:
- benchmark
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/benchcltr.hfa
r7f6e9eb r5bcdc8c 22 22 {"procstat", no_argument , 0, 'P'}, \ 23 23 {"viewhalts", no_argument , 0, 'V'}, 24 25 #define BENCH_DECL \26 double duration = 5; \27 int nprocs = 1; \28 int nthreads = 1;29 24 30 25 #define BENCH_OPT_CASE \ … … 60 55 break; 61 56 57 double duration = 5; 58 int nprocs = 1; 59 int nthreads = 1; 62 60 bool silent = false; 61 bool continuous = false; 63 62 bool procstats = false; 64 63 bool viewhalts = false; 65 64 65 #define BENCH_OPT_CFA \ 66 {'d', "duration", "Duration of the experiments in seconds", duration }, \ 67 {'t', "nthreads", "Number of threads to use", nthreads }, \ 68 {'p', "nprocs", "Number of processors to use", nprocs }, \ 69 {'S', "nostats", "Don't print statistics", silent, parse_settrue }, \ 70 {'C', "constats", "Regularly print statistics", continuous, parse_settrue }, \ 71 {'P', "procstat", "Print statistics for each processors", procstats, parse_settrue }, \ 72 {'V', "viewhalts", "Visualize halts, prints timestamp and Processor id for each halt.", viewhalts, parse_settrue }, 73 66 74 #ifdef __cforall 75 #include <parseargs.hfa> 76 67 77 struct cluster * the_benchmark_cluster = 0p; 68 78 struct BenchCluster { -
benchmark/readyQ/yield.cfa
r7f6e9eb r5bcdc8c 43 43 44 44 int main(int argc, char * argv[]) { 45 BENCH_DECL46 45 unsigned num_io = 1; 47 46 io_context_params params; 48 47 49 for(;;) { 50 static struct option options[] = { 51 BENCH_OPT_LONG 52 {0, 0, 0, 0} 53 }; 48 cfa_option opt[] = { 49 BENCH_OPT_CFA 50 }; 51 int opt_cnt = sizeof(opt) / sizeof(cfa_option); 54 52 55 int idx = 0; 56 int opt = getopt_long(argc, argv, BENCH_OPT_SHORT, options, &idx); 57 58 const char * arg = optarg ? optarg : ""; 59 char * end; 60 switch(opt) { 61 case -1: 62 goto run; 63 BENCH_OPT_CASE 64 default: /* ? */ 65 fprintf( stderr, "Unkown option '%c'\n", opt); 66 usage: 67 bench_usage( argv ); 68 exit(1); 69 } 70 } 71 run: 53 char **left; 54 parse_args( argc, argv, opt, opt_cnt, "[OPTIONS]...\ncforall yield benchmark", left ); 72 55 73 56 {
Note: See TracChangeset
for help on using the changeset viewer.