pub struct RngWide { /* private fields */ }sse2 or avx2 or avx512f)).Expand description
Implements RomuTrio with 512-bit width.
Implementations§
Source§impl RngWide
impl RngWide
Sourcepub fn new() -> Self
Available on non-crate feature unstable_simd only.
pub fn new() -> Self
unstable_simd only.Creates a new RngWide with a seed from the best available randomness source.
Sourcepub const fn from_seed_with_64bit(seeds: [u64; 8]) -> Self
Available on non-crate feature unstable_simd only.
pub const fn from_seed_with_64bit(seeds: [u64; 8]) -> Self
unstable_simd only.Creates a new RngWide from the given eight 64-bit seeds.
The seeds should be from a high randomness source.
Sourcepub const fn from_seed_with_192bit(seeds: [[u64; 3]; 8]) -> Self
Available on non-crate feature unstable_simd only.
pub const fn from_seed_with_192bit(seeds: [[u64; 3]; 8]) -> Self
unstable_simd only.Creates a new RngWide from the given eight 192-bit seeds.
The seeds should be from a high randomness source.
If the seeds are of low quality, user should call RngWide::mix() to improve the quality of the
first couple of random numbers.
§Notice
The variables must be seeded such that at least one bit of state is non-zero.
Sourcepub fn mix(&mut self)
Available on non-crate feature unstable_simd only.
pub fn mix(&mut self)
unstable_simd only.Mixes the states, which should improve the quality of the random numbers.
Should be called when having (re-)seeded the generator with a fixed value of low randomness.
Sourcepub fn seed(&mut self)
Available on non-crate feature unstable_simd only.
pub fn seed(&mut self)
unstable_simd only.Re-seeds the RngWide from the best available randomness source.
Sourcepub fn u64x8(&mut self) -> [u64; 8]
Available on non-crate feature unstable_simd only.
pub fn u64x8(&mut self) -> [u64; 8]
unstable_simd only.Generates eight random u64 values.
Sourcepub fn fill_bytes(&mut self, slice: &mut [u8])
Available on non-crate feature unstable_simd only.
pub fn fill_bytes(&mut self, slice: &mut [u8])
unstable_simd only.Fills a mutable [u8] slice with random values.