- Timestamp:
- Jan 18, 2022, 8:49:43 PM (3 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/transfer.cfa
rb5f17e14 r038a0bd 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.