Changeset c4241b6
- Timestamp:
- Jan 5, 2021, 2:51:53 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- ed1a6374
- Parents:
- abc2a643
- Location:
- benchmark/readyQ
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/cycle.cpp
rabc2a643 rc4241b6 71 71 { 'r', "ringsize", "Number of threads in a cycle", ring_size } 72 72 }; 73 BENCH_OPT_PARSE(" cforallcycle benchmark");73 BENCH_OPT_PARSE("libfibre cycle benchmark"); 74 74 75 75 { -
benchmark/readyQ/locality.cfa
rabc2a643 rc4241b6 8 8 9 9 // ================================================== 10 thread MyThread {10 thread __attribute__((aligned(128))) MyThread { 11 11 struct MyData * volatile data; 12 12 … … 35 35 36 36 // ================================================== 37 struct MyData {37 struct __attribute__((aligned(128))) MyData { 38 38 uint64_t _p1[16]; // padding 39 39 uint64_t * data; … … 71 71 // Atomic object where a single thread can wait 72 72 // May exchanges data 73 struct MySpot {73 struct __attribute__((aligned(128))) MySpot { 74 74 MyThread * volatile ptr; 75 75 size_t id; -
benchmark/readyQ/rq_bench.hpp
rabc2a643 rc4241b6 97 97 } 98 98 99 bool parse_truefalse(const char * arg, bool & value) { 100 if(strcmp(arg, "true") == 0) { 101 value = true; 102 return true; 103 } 104 105 if(strcmp(arg, "false") == 0) { 106 value = false; 107 return true; 108 } 109 110 return false; 111 } 112 99 113 bool parse_settrue (const char *, bool & value ) { 100 114 value = true; … … 226 240 { 227 241 int idx = 0; 228 for( int i = 0; i < opt_count; i++) {242 for(size_t i = 0; i < opt_count; i++) { 229 243 if(options[i].long_name) { 230 244 optarr[idx].name = options[i].long_name; … … 256 270 { 257 271 int idx = 0; 258 for( int i = 0; i < opt_count; i++) {272 for(size_t i = 0; i < opt_count; i++) { 259 273 optstring[idx] = options[i].short_name; 260 274 idx++; … … 279 293 case 'h': 280 294 out = stdout; 295 [[fallthrough]]; 281 296 case '?': 282 297 usage(argv[0], options, opt_count, usage_msg, out); 283 298 default: 284 for( int i = 0; i < opt_count; i++) {299 for(size_t i = 0; i < opt_count; i++) { 285 300 if(opt == options[i].short_name) { 286 301 const char * arg = optarg ? optarg : ""; 302 if( arg[0] == '=' ) { arg++; } 287 303 bool success = options[i].parse_fun( arg, options[i].variable ); 288 304 if(success) goto NEXT_ARG; … … 319 335 int width = 0; 320 336 { 321 for( int i = 0; i < opt_count; i++) {337 for(size_t i = 0; i < opt_count; i++) { 322 338 if(options[i].long_name) { 323 339 int w = strlen(options[i].long_name); … … 338 354 fprintf(out, "Usage:\n %s %s\n", cmd, help); 339 355 340 for( int i = 0; i < opt_count; i++) {356 for(size_t i = 0; i < opt_count; i++) { 341 357 printopt(out, width, max_width, options[i].short_name, options[i].long_name, options[i].help); 342 358 }
Note: See TracChangeset
for help on using the changeset viewer.