Changeset 038a0bd for benchmark


Ignore:
Timestamp:
Jan 18, 2022, 8:49:43 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
6a33e40
Parents:
b5f17e14 (diff), adfd125 (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 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/transfer.cfa

    rb5f17e14 r038a0bd  
    11#include "rq_bench.hfa"
    22#include <fstream.hfa>
     3#include <locale.h>
    34
    45Duration default_preemption() {
     
    89#define PRINT(...)
    910
    10 __lehmer64_state_t lead_seed;
     11__uint128_t lead_seed;
    1112volatile unsigned leader;
    1213volatile size_t lead_idx;
     
    6869        waitgroup();
    6970
    70         unsigned nleader = __lehmer64( lead_seed ) % nthreads;
     71        unsigned nleader = lehmer64( lead_seed ) % nthreads;
    7172        __atomic_store_n( &leader, nleader, __ATOMIC_SEQ_CST );
    7273
     
    105106// ==================================================
    106107int main(int argc, char * argv[]) {
    107         __lehmer64_state_t lead_seed = getpid();
    108         for(10) __lehmer64( lead_seed );
     108        uint64_t lead_seed = getpid();
     109        for(10) lehmer64( lead_seed );
    109110        unsigned nprocs = 2;
    110111
     
    126127
    127128        lead_idx = 0;
    128         leader = __lehmer64( lead_seed ) % nthreads;
     129        leader = lehmer64( lead_seed ) % nthreads;
    129130
    130131        size_t rechecks = 0;
     
    167168        }
    168169
     170        setlocale( LC_NUMERIC, getenv( "LANG" ) );
    169171        sout | "Duration (ms)           : " | ws(3, 3, unit(eng((end - start)`dms)));
    170172        sout | "Number of processors    : " | nprocs;
Note: See TracChangeset for help on using the changeset viewer.