Ignore:
File:
1 edited

Legend:

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

    rf0c3120 r8c60d59  
    1414
    1515        void arrive(int idx) {
    16                 idx >>= 2;
    1716                idx %= mask;
    1817                nodes[idx].arrive();
     
    2019
    2120        void depart(int idx) {
    22                 idx >>= 2;
    2321                idx %= mask;
    2422                nodes[idx].depart();
     
    8482                                if( x.cnt == val_t::Half ) {
    8583                                        /* paranoid */ assert(parent);
    86                                         if(undoArr == 2) {
    87                                                 undoArr--;
    88                                         } else {
    89                                                 parent->arrive();
    90                                         }
     84                                        parent->arrive();
    9185                                        if( !value.cas(x, 1, x.ver) ) {
    9286                                                undoArr = undoArr + 1;
     
    157151{
    158152        int width = std::pow(base, depth);
    159         std::cout << "SNZI: " << depth << "x" << width << "(" << mask - 1 << ") " << (sizeof(snzi_t::node) * (root + 1)) << " bytes" << std::endl;
     153        std::cout << "SNZI: " << depth << "x" << width << "(" << mask - 1 << ")" << std::endl;
    160154        for(int i = 0; i < root; i++) {
    161                 std::cout << i << " -> " << (i / base) + width << std::endl;
    162                 nodes[i].parent = &nodes[(i / base) + width];
     155                nodes[i].parent = &nodes[(i / base) + width ];
    163156        }
    164157}
Note: See TracChangeset for help on using the changeset viewer.