Skip to main content

Crate urng

Crate urng 

Source
Expand description

§Universal RNG

A collection of random number generators.

This crate provides implementations of various pseudo-random number generators (PRNGs), including:

Each generator supports generating uniform random numbers for various types (u32, u64, f32, f64) and ranges.

Modules§

cabi32
C-compatible ABI wrappers for the 32-bit RNGs.
cabi64
C-compatible ABI wrappers for the 64-bit RNGs.
macros
Macros for quick random number generation.
prelude
rng
A 32/64-bit random number generator trait.
rng32
Consolidated 32-bit random number generators. Consolidated 32-bit random number generators.
rng64
Consolidated 64-bit random number generators. Consolidated 64-bit random number generators.

Macros§

dispatch_simd
Dispatches to an AVX-512 optimized path on x86_64 when available, otherwise falls back.
safe_test
unsafe_test
wrap
Wraps a value in a Wrapping type.