Changeset 5fe7322


Ignore:
Timestamp:
Aug 25, 2020, 12:22:55 PM (14 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
d119d613
Parents:
a3effcc
Message:

Implemented reverse-rng strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/ready_queue.cfa

    ra3effcc r5fe7322  
    262262        do {
    263263                // Pick the index of a lane
    264                 unsigned r = __tls_rand();
     264                // unsigned r = __tls_rand();
     265                unsigned r = __tls_rand_fwd();
    265266                [i, local] = idx_from_r(r, preferred);
    266267
     
    283284
    284285        // Actually push it
    285         bool lane_first = push(lanes.data[i], thrd);
     286        #ifdef USE_SNZI
     287                bool lane_first =
     288        #endif
     289
     290        push(lanes.data[i], thrd);
    286291
    287292        #ifdef USE_SNZI
     
    295300                }
    296301        #endif
     302
     303        __tls_rand_advance_bck();
    297304
    298305        // Unlock and return
     
    335342        #endif
    336343                // Pick two lists at random
    337                 unsigned ri = __tls_rand();
    338                 unsigned rj = __tls_rand();
     344                // unsigned ri = __tls_rand();
     345                // unsigned rj = __tls_rand();
     346                unsigned ri = __tls_rand_bck();
     347                unsigned rj = __tls_rand_bck();
    339348
    340349                unsigned i, j;
Note: See TracChangeset for help on using the changeset viewer.