Changeset 29702ad for libcfa/src/bits
- Timestamp:
- Nov 22, 2022, 10:18:04 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 20cf96d
- Parents:
- 1553a55 (diff), d41735a (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
-
libcfa/src/bits/random.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/random.hfa
r1553a55 r29702ad 10 10 // Created On : Fri Jan 14 07:18:11 2022 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jan 14 07:18:58202213 // Update Count : 1 12 // Last Modified On : Mon Nov 21 17:50:12 2022 13 // Update Count : 15 14 14 // 15 15 … … 17 17 18 18 #include <stdint.h> 19 20 // Set default PRNG for architecture size. 21 #ifdef __x86_64__ // 64-bit architecture 22 #define LEHMER64 23 #else // 32-bit architecture 24 #define XORSHIFT_6_21_7 25 #endif // __x86_64__ 26 27 // C/CFA PRNG name and random-state. 28 #ifdef LEHMER64 29 #define PRNG_NAME lehmer64 30 #define PRNG_ARG_T __uint128_t 31 #endif // LEHMER64 32 33 #ifdef XORSHIFT_6_21_7 34 #define PRNG_NAME xorshift_6_21_7 35 #define PRNG_ARG_T uint32_t 36 #endif // XORSHIFT_6_21_7 37 38 #ifdef __cforall // don't include in C code (invoke.h) 19 39 20 40 // Pipelined to allow out-of-order overlap with reduced dependencies. Critically, the current random state is returned … … 61 81 //-------------------------------------------------- 62 82 typedef struct { 63 uint32_t a, b, c, d;64 uint32_t counter;83 uint32_t a, b, c, d; 84 uint32_t counter; 65 85 } xorwow__state_t; 66 86 … … 116 136 #undef C 117 137 #undef D 138 139 #endif // __cforall
Note:
See TracChangeset
for help on using the changeset viewer.