Ignore:
Timestamp:
Jul 23, 2020, 1:37:31 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:
04b73b6
Parents:
2e5fd8b6
Message:

Added unsuccesfull reverse rng attempt

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  
    3030#include "links.hpp"
    3131#include "snzi.hpp"
     32#include "snzi-packed.hpp"
    3233#include "snzm.hpp"
    3334
     
    8283                : numLists(numThreads * numQueues)
    8384                , 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
    8693                #elif VARIANT == SNZM || VARIANT == DISCOVER
    8794                        , snzm( numLists )
     
    421428                unsigned i;
    422429                if(bias) {
    423                         if(0 == (r & 0xF)) {
    424                                 i = r >> 4;
     430                        if(0 == (r & 0x3F)) {
     431                                i = r >> 6;
    425432                        } else {
    426                                 i = tls.my_queue + ((r >> 4) % 4);
     433                                i = tls.my_queue + ((r >> 6) % 4);
    427434                                tls.pick.push.local++;
    428435                        }
     
    448455        __attribute__((aligned(64))) std::unique_ptr<intrusive_queue_t<node_t> []> lists;
    449456private:
    450         #if VARIANT == SNZI || VARIANT == BIAS || VARIANT == BACK || VARIANT == BACKBIAS
     457        #if VARIANT == SNZI || VARIANT == BACK
    451458                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
    452465        #elif VARIANT == SNZM || VARIANT == DISCOVER
    453466                snzm_t snzm;
  • doc/theses/thierry_delisle_PhD/code/snzi.hpp

    r2e5fd8b6 rf0c3120  
    157157{
    158158        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;
    160160        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];
    162163        }
    163164}
Note: See TracChangeset for help on using the changeset viewer.