Ignore:
Timestamp:
Jun 10, 2020, 12:13:18 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:
97392b69
Parents:
6089f4d (diff), 5f259f3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'relaxed_ready' of plg.uwaterloo.ca:software/cfa/cfa-cc into relaxed_ready

File:
1 edited

Legend:

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

    r6089f4d ra5873bd  
    222222                                        if(maski == 0 && maskj == 0) continue;
    223223
    224                                         unsigned bi = rand_bit(ri >> snzm.depth, maski);
    225                                         unsigned bj = rand_bit(rj >> snzm.depth, maskj);
    226 
    227                                         assertf(bi < 64, "%zu %u", maski, bi);
    228                                         assertf(bj < 64, "%zu %u", maskj, bj);
     224                                        #if defined(__BMI2__)
     225                                                uint64_t idxsi = _pext_u64(snzm.indexes, maski);
     226                                                uint64_t idxsj = _pext_u64(snzm.indexes, maskj);
     227
     228                                                auto pi = __builtin_popcountll(maski);
     229                                                auto pj = __builtin_popcountll(maskj);
     230
     231                                                ri = pi ? ri & ((pi >> 3) - 1) : 0;
     232                                                rj = pj ? rj & ((pj >> 3) - 1) : 0;
     233
     234                                                unsigned bi = (idxsi >> (ri << 3)) & 0xff;
     235                                                unsigned bj = (idxsj >> (rj << 3)) & 0xff;
     236                                        #else
     237                                                unsigned bi = rand_bit(ri >> snzm.depth, maski);
     238                                                unsigned bj = rand_bit(rj >> snzm.depth, maskj);
     239                                        #endif
    229240
    230241                                        i = (bi << snzm.depth) | wdxi;
    231242                                        j = (bj << snzm.depth) | wdxj;
    232243
    233                                         assertf(i < numLists, "%u %u", bj, wdxi);
    234                                         assertf(j < numLists, "%u %u", bj, wdxj);
     244                                        /* paranoid */ assertf(i < numLists, "%u %u", bj, wdxi);
     245                                        /* paranoid */ assertf(j < numLists, "%u %u", bj, wdxj);
    235246                                }
    236247
Note: See TracChangeset for help on using the changeset viewer.