Changeset adfd125 for benchmark


Ignore:
Timestamp:
Jan 18, 2022, 1:56:04 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
038a0bd
Parents:
175f9f4
Message:

Changed benchmark to use sout and commas.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/transfer.cfa

    r175f9f4 radfd125  
    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.