Changeset f0c3120
- Timestamp:
- Jul 23, 2020, 1:37:31 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:
- 04b73b6
- Parents:
- 2e5fd8b6
- Location:
- doc/theses/thierry_delisle_PhD/code
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/code/relaxed_list.hpp
r2e5fd8b6 rf0c3120 30 30 #include "links.hpp" 31 31 #include "snzi.hpp" 32 #include "snzi-packed.hpp" 32 33 #include "snzm.hpp" 33 34 … … 82 83 : numLists(numThreads * numQueues) 83 84 , lists(new intrusive_queue_t<node_t>[numLists]) 84 #if VARIANT == SNZI || VARIANT == BIAS || VARIANT == BACK || VARIANT == BACKBIAS 85 , snzi( std::log2( numLists / (numQueues) ), 2 ) 85 #if VARIANT == SNZI || VARIANT == BACK 86 , snzi( std::log2( numLists / (2 * numQueues) ), 2 ) 87 #elif VARIANT == BIAS || VARIANT == BACKBIAS 88 #ifdef SNZI_PACKED 89 , snzi( std::ceil( std::log2(numLists) ) ) 90 #else 91 , snzi( std::log2( numLists / (2 * numQueues) ), 2 ) 92 #endif 86 93 #elif VARIANT == SNZM || VARIANT == DISCOVER 87 94 , snzm( numLists ) … … 421 428 unsigned i; 422 429 if(bias) { 423 if(0 == (r & 0x F)) {424 i = r >> 4;430 if(0 == (r & 0x3F)) { 431 i = r >> 6; 425 432 } else { 426 i = tls.my_queue + ((r >> 4) % 4);433 i = tls.my_queue + ((r >> 6) % 4); 427 434 tls.pick.push.local++; 428 435 } … … 448 455 __attribute__((aligned(64))) std::unique_ptr<intrusive_queue_t<node_t> []> lists; 449 456 private: 450 #if VARIANT == SNZI || VARIANT == B IAS || VARIANT == BACK || VARIANT == BACKBIAS457 #if VARIANT == SNZI || VARIANT == BACK 451 458 snzi_t snzi; 459 #elif VARIANT == BIAS || VARIANT == BACKBIAS 460 #ifdef SNZI_PACKED 461 snzip_t snzi; 462 #else 463 snzi_t snzi; 464 #endif 452 465 #elif VARIANT == SNZM || VARIANT == DISCOVER 453 466 snzm_t snzm; -
doc/theses/thierry_delisle_PhD/code/snzi.hpp
r2e5fd8b6 rf0c3120 157 157 { 158 158 int width = std::pow(base, depth); 159 std::cout << "SNZI: " << depth << "x" << width << "(" << mask - 1 << ") " << std::endl;159 std::cout << "SNZI: " << depth << "x" << width << "(" << mask - 1 << ") " << (sizeof(snzi_t::node) * (root + 1)) << " bytes" << std::endl; 160 160 for(int i = 0; i < root; i++) { 161 nodes[i].parent = &nodes[(i / base) + width ]; 161 std::cout << i << " -> " << (i / base) + width << std::endl; 162 nodes[i].parent = &nodes[(i / base) + width]; 162 163 } 163 164 }
Note: See TracChangeset
for help on using the changeset viewer.