Changeset 2e5fd8b6 for doc/theses


Ignore:
Timestamp:
Jul 22, 2020, 4:09:49 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Changed seed to be more different per threads and added more snzi nodes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/code/relaxed_list.hpp

    r9304ca2 r2e5fd8b6  
    2020
    2121#include <cmath>
     22#include <functional>
    2223#include <memory>
    2324#include <mutex>
     25#include <thread>
    2426#include <type_traits>
    2527
     
    8183                , lists(new intrusive_queue_t<node_t>[numLists])
    8284                #if VARIANT == SNZI || VARIANT == BIAS || VARIANT == BACK || VARIANT == BACKBIAS
    83                         , snzi( std::log2( numLists / (2 * numQueues) ), 2 )
     85                        , snzi( std::log2( numLists / (numQueues) ), 2 )
    8486                #elif VARIANT == SNZM || VARIANT == DISCOVER
    8587                        , snzm( numLists )
     
    434436
    435437        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()) };
    438440                unsigned   my_queue = (ticket++) * 4;
    439441                pick_stat  pick;
Note: See TracChangeset for help on using the changeset viewer.