1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! PCG related things.
//!
//! The basic form of PCG is the `Pick` flavor. There's also `Mem` and `Phantom`
//! versions which are the same general idea, but get the stream selection value
//! comes from some place other than being stored in the generator itself.
//!
//! Unlike the normal PCGs, where the output permutation is fixed as part of the
//! generator and so the generator name is based on the _output size_, these
//! PCGs offer more than one output permutation, so their names are based on
//! their _state size_.
use *;
pub use *;
pub use *;
pub use *;
pub use *;
// Default Constants
// Note(Lokathor): Changing these values can cause the MCG to trigger UB!! They
// must always be odd values. That's not a big deal, since any good LCG
// multiplier will be odd anyway, but you have been warned.
/// The default PCG multiplier for 8 bits of state
pub const PCG_DEFAULT_MULTIPLIER_8: u8 = 141;
/// The default PCG multiplier for 16 bits of state
pub const PCG_DEFAULT_MULTIPLIER_16: u16 = 12829;
/// The default PCG multiplier for 32 bits of state
pub const PCG_DEFAULT_MULTIPLIER_32: u32 = 747796405;
/// The default PCG multiplier for 64 bits of state
pub const PCG_DEFAULT_MULTIPLIER_64: u64 = 6364136223846793005;
/// The default PCG multiplier for 128 bits of state
pub const PCG_DEFAULT_MULTIPLIER_128: u128 = 47026247687942121848144207491837523525;
/// The default PCG increment for 8 bits of state
pub const PCG_DEFAULT_INCREMENT_8: NonZeroU8 = unsafe ;
/// The default PCG increment for 16 bits of state
pub const PCG_DEFAULT_INCREMENT_16: NonZeroU16 = unsafe ;
/// The default PCG increment for 32 bits of state
pub const PCG_DEFAULT_INCREMENT_32: NonZeroU32 = unsafe ;
/// The default PCG increment for 64 bits of state
pub const PCG_DEFAULT_INCREMENT_64: NonZeroU64 = unsafe ;
/// The default PCG increment for 128 bits of state
pub const PCG_DEFAULT_INCREMENT_128: NonZeroU128 = unsafe ;