- Timestamp:
- Jan 18, 2022, 1:56:04 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 038a0bd
- Parents:
- 175f9f4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/transfer.cfa
r175f9f4 radfd125 1 1 #include "rq_bench.hfa" 2 2 #include <fstream.hfa> 3 #include <locale.h> 3 4 4 5 Duration default_preemption() { … … 8 9 #define PRINT(...) 9 10 10 __ lehmer64_state_t lead_seed;11 __uint128_t lead_seed; 11 12 volatile unsigned leader; 12 13 volatile size_t lead_idx; … … 68 69 waitgroup(); 69 70 70 unsigned nleader = __lehmer64( lead_seed ) % nthreads;71 unsigned nleader = lehmer64( lead_seed ) % nthreads; 71 72 __atomic_store_n( &leader, nleader, __ATOMIC_SEQ_CST ); 72 73 … … 105 106 // ================================================== 106 107 int 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 ); 109 110 unsigned nprocs = 2; 110 111 … … 126 127 127 128 lead_idx = 0; 128 leader = __lehmer64( lead_seed ) % nthreads;129 leader = lehmer64( lead_seed ) % nthreads; 129 130 130 131 size_t rechecks = 0; … … 167 168 } 168 169 170 setlocale( LC_NUMERIC, getenv( "LANG" ) ); 169 171 sout | "Duration (ms) : " | ws(3, 3, unit(eng((end - start)`dms))); 170 172 sout | "Number of processors : " | nprocs;
Note: See TracChangeset
for help on using the changeset viewer.