Changeset 12b5e94a for libcfa/src/stdlib.hfa
- Timestamp:
- Feb 9, 2022, 10:59:05 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
- Children:
- 454b4e0
- Parents:
- 7a15b7e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/stdlib.hfa
r7a15b7e r12b5e94a 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Jan 13 21:34:46202213 // Update Count : 6 3612 // Last Modified On : Sat Jan 15 09:57:28 2022 13 // Update Count : 640 14 14 // 15 15 … … 18 18 #include "bits/defs.hfa" // OPTIONAL_THREAD 19 19 #include "bits/align.hfa" // libAlign 20 #include "bits/random.hfa" // prng 20 21 21 22 #include <stdlib.h> // *alloc, strto*, ato* … … 410 411 411 412 void set_seed( PRNG & prng, uint32_t seed_ ); 412 uint32_t prng( PRNG & prng ) __attribute__(( warn_unused_result )); // [0,UINT_MAX]413 413 static inline { 414 uint32_t prng( PRNG & prng ) __attribute__(( warn_unused_result )) with( prng ) { callcnt += 1; return LCG( state ); } // [0,UINT_MAX] 414 415 void ?{}( PRNG & prng ) { set_seed( prng, rdtscl() ); } // random seed 415 416 void ?{}( PRNG & prng, uint32_t seed ) { set_seed( prng, seed ); } // fixed seed
Note: See TracChangeset
for help on using the changeset viewer.