Changes in / [ed1a6374:95eec2c]
- Location:
- benchmark/readyQ
- Files:
-
- 1 deleted
- 3 edited
-
cycle.cpp (modified) (1 diff)
-
locality.cfa (modified) (3 diffs)
-
locality.cpp (deleted)
-
rq_bench.hpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/cycle.cpp
red1a6374 r95eec2c 71 71 { 'r', "ringsize", "Number of threads in a cycle", ring_size } 72 72 }; 73 BENCH_OPT_PARSE(" libfibrecycle benchmark");73 BENCH_OPT_PARSE("cforall cycle benchmark"); 74 74 75 75 { -
benchmark/readyQ/locality.cfa
red1a6374 r95eec2c 8 8 9 9 // ================================================== 10 thread __attribute__((aligned(128)))MyThread {10 thread MyThread { 11 11 struct MyData * volatile data; 12 12 … … 35 35 36 36 // ================================================== 37 struct __attribute__((aligned(128)))MyData {37 struct 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 __attribute__((aligned(128)))MySpot {73 struct MySpot { 74 74 MyThread * volatile ptr; 75 75 size_t id; -
benchmark/readyQ/rq_bench.hpp
red1a6374 r95eec2c 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 113 99 bool parse_settrue (const char *, bool & value ) { 114 100 value = true; … … 240 226 { 241 227 int idx = 0; 242 for( size_t i = 0; i < opt_count; i++) {228 for(int i = 0; i < opt_count; i++) { 243 229 if(options[i].long_name) { 244 230 optarr[idx].name = options[i].long_name; … … 270 256 { 271 257 int idx = 0; 272 for( size_t i = 0; i < opt_count; i++) {258 for(int i = 0; i < opt_count; i++) { 273 259 optstring[idx] = options[i].short_name; 274 260 idx++; … … 293 279 case 'h': 294 280 out = stdout; 295 [[fallthrough]];296 281 case '?': 297 282 usage(argv[0], options, opt_count, usage_msg, out); 298 283 default: 299 for( size_t i = 0; i < opt_count; i++) {284 for(int i = 0; i < opt_count; i++) { 300 285 if(opt == options[i].short_name) { 301 286 const char * arg = optarg ? optarg : ""; 302 if( arg[0] == '=' ) { arg++; }303 287 bool success = options[i].parse_fun( arg, options[i].variable ); 304 288 if(success) goto NEXT_ARG; … … 335 319 int width = 0; 336 320 { 337 for( size_t i = 0; i < opt_count; i++) {321 for(int i = 0; i < opt_count; i++) { 338 322 if(options[i].long_name) { 339 323 int w = strlen(options[i].long_name); … … 354 338 fprintf(out, "Usage:\n %s %s\n", cmd, help); 355 339 356 for( size_t i = 0; i < opt_count; i++) {340 for(int i = 0; i < opt_count; i++) { 357 341 printopt(out, width, max_width, options[i].short_name, options[i].long_name, options[i].help); 358 342 }
Note:
See TracChangeset
for help on using the changeset viewer.