Changes in / [a5873bd:5f259f3]
- Location:
- doc/theses/thierry_delisle_PhD/code
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/code/relaxed_list.hpp
ra5873bd r5f259f3 73 73 "SNZI", 74 74 "BITMASK", 75 " SNZI + DISCOVERED MASK",75 "DISCOVER", 76 76 "SNZI + MASK" 77 77 }; … … 82 82 : lists(new intrusive_queue_t[numLists]) 83 83 , numLists(numLists) 84 #if VARIANT == SNZI 84 #if VARIANT == SNZI || VARIANT == DISCOVER 85 85 , snzi( std::log2( numLists / 8 ), 2 ) 86 #elif VARIANT == SNZM || VARIANT == DISCOVER86 #elif VARIANT == SNZM 87 87 , snzm( numLists ) 88 88 #endif … … 128 128 assert(qword == 0); 129 129 bts(tls.mask, bit); 130 snz m.arrive(i);130 snzi.arrive(i); 131 131 #elif VARIANT == SNZI 132 132 snzi.arrive(i); … … 166 166 #if VARIANT == DISCOVER 167 167 assert(numLists <= 64); 168 while(snz m.query()) {168 while(snzi.query()) { 169 169 tls.pick.pop.mask_attempt++; 170 170 unsigned i, j; … … 180 180 tls.pick.pop.mask_reset++; 181 181 mask = (1U << numLists) - 1; 182 tls.mask.store(mask, std::memory_order_relaxed);183 182 } 184 183 … … 203 202 } 204 203 #elif VARIANT == SNZM 205 //*206 204 while(snzm.query()) { 207 205 tls.pick.pop.mask_attempt++; … … 248 246 if(auto node = try_pop(i, j)) return node; 249 247 } 250 /*/251 while(snzm.query()) {252 // Pick two lists at random253 int i = tls.rng.next() % numLists;254 int j = tls.rng.next() % numLists;255 256 if(auto node = try_pop(i, j)) return node;257 }258 //*/259 248 #elif VARIANT == BITMASK 260 249 int nnempty; … … 351 340 assert(qword == 0); 352 341 __attribute__((unused)) bool ret = btr(tls.mask, bit); 353 snz m.depart(w);342 snzi.depart(w); 354 343 #elif VARIANT == SNZI 355 344 snzi.depart(w); … … 522 511 const unsigned numLists; 523 512 private: 524 #if VARIANT == SNZI 513 #if VARIANT == SNZI || VARIANT == DISCOVER 525 514 snzi_t snzi; 526 #elif VARIANT == SNZM || VARIANT == DISCOVER515 #elif VARIANT == SNZM 527 516 snzm_t snzm; 528 517 #else … … 613 602 double pop_sur = (100.0 * double(global.pick.pop .success) / global.pick.pop .attempt); 614 603 double mpop_sur = (100.0 * double(global.pick.pop .success) / global.pick.pop .mask_attempt); 615 double rpop_sur = (100.0 * double(global.pick.pop .success) / global.pick.pop .mask_reset); 616 617 double push_len = double(global.pick.push.attempt ) / global.pick.push.success; 618 double pop_len = double(global.pick.pop .attempt ) / global.pick.pop .success; 619 double mpop_len = double(global.pick.pop .mask_attempt) / global.pick.pop .success; 620 double rpop_len = double(global.pick.pop .mask_reset ) / global.pick.pop .success; 621 622 os << "Push Pick : " << push_sur << " %, len " << push_len << " (" << global.pick.push.attempt << " / " << global.pick.push.success << ")\n"; 623 os << "Pop Pick : " << pop_sur << " %, len " << pop_len << " (" << global.pick.pop .attempt << " / " << global.pick.pop .success << ")\n"; 624 os << "TryPop Pick : " << mpop_sur << " %, len " << mpop_len << " (" << global.pick.pop .mask_attempt << " / " << global.pick.pop .success << ")\n"; 625 os << "Pop M Reset : " << rpop_sur << " %, len " << rpop_len << " (" << global.pick.pop .mask_reset << " / " << global.pick.pop .success << ")\n"; 604 double rpop_sur = (100.0 * double(global.pick.pop .mask_reset) / global.pick.pop .mask_attempt); 605 606 os << "Push Pick % : " << push_sur << "(" << global.pick.push.success << " / " << global.pick.push.attempt << ")\n"; 607 os << "Pop Pick % : " << pop_sur << "(" << global.pick.pop .success << " / " << global.pick.pop .attempt << ")\n"; 608 os << "TryPop Pick % : " << mpop_sur << "(" << global.pick.pop .success << " / " << global.pick.pop .mask_attempt << ")\n"; 609 os << "Pop M Reset % : " << rpop_sur << "(" << global.pick.pop .mask_reset << " / " << global.pick.pop .mask_attempt << ")\n"; 626 610 627 611 double avgQ_push = double(global.qstat.push.value) / global.qstat.push.count;
Note: See TracChangeset
for help on using the changeset viewer.