Changeset 2e5fd8b6 for doc/theses
- Timestamp:
- Jul 22, 2020, 4:09:49 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:
- f0c3120
- Parents:
- 9304ca2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/code/relaxed_list.hpp
r9304ca2 r2e5fd8b6 20 20 21 21 #include <cmath> 22 #include <functional> 22 23 #include <memory> 23 24 #include <mutex> 25 #include <thread> 24 26 #include <type_traits> 25 27 … … 81 83 , lists(new intrusive_queue_t<node_t>[numLists]) 82 84 #if VARIANT == SNZI || VARIANT == BIAS || VARIANT == BACK || VARIANT == BACKBIAS 83 , snzi( std::log2( numLists / ( 2 *numQueues) ), 2 )85 , snzi( std::log2( numLists / (numQueues) ), 2 ) 84 86 #elif VARIANT == SNZM || VARIANT == DISCOVER 85 87 , snzm( numLists ) … … 434 436 435 437 static __attribute__((aligned(128))) thread_local struct TLS { 436 Random rng1 = { int(rdtscl()) };437 Random rng2 = { int(rdtscl()) };438 Random rng1 = { unsigned(std::hash<std::thread::id>{}(std::this_thread::get_id()) ^ rdtscl()) }; 439 Random rng2 = { unsigned(std::hash<std::thread::id>{}(std::this_thread::get_id()) ^ rdtscl()) }; 438 440 unsigned my_queue = (ticket++) * 4; 439 441 pick_stat pick;
Note: See TracChangeset
for help on using the changeset viewer.