Expand description
Thin Rust-level wrappers over [cudarc::curand::sys] for the
cuRAND host-API entry points that aren’t surfaced by the safe
[cudarc::curand::CudaRng] handle:
- generator creation by explicit
curandRngType_t(Philox4_32_10,XORWOW,MTGP32,MRG32K3A, plus all four Sobol variants); - the host-API generator pair (
curandCreateGeneratorHost— fills host buffers, copies internally); curandSetQuasiRandomGeneratorDimensions,curandSetGeneratorOrdering,curandSetGeneratorOffset;- the Poisson and bit-generator families
(
curandGeneratePoisson,curandGenerate,curandGenerateLongLong).
These functions are unsafe — they take the raw
curandGenerator_t and require the caller to keep the generator
alive, valid, and bound to a stream that the destination pointer
lives on. The actor in kernel/rng/* is the only intended caller.
Enums§
- RngGenerator
Kind - Public mirror of [
sys::curandRngType_t] so callers don’t have to take acudarc::curand::sys::*symbol on their public API. The numeric values match cuRAND.
Functions§
- create_
generator ⚠ - Create a device-side generator of the given
kind(curandCreateGenerator). - destroy_
generator ⚠ curandDestroyGenerator.- generate_
poisson_ ⚠u32 curandGeneratePoisson— filloutwithnu32 values drawn from a Poisson distribution parameterised bylambda(f64).- generate_
u32 ⚠ curandGenerate— raw u32 bit fill (used as the building block for any custom transform).- generate_
u64 ⚠ curandGenerateLongLong— raw u64 bit fill.- set_
offset ⚠ curandSetGeneratorOffset.- set_
seed ⚠ curandSetPseudoRandomGeneratorSeed.- set_
stream ⚠ - Bind
gentostream(curandSetStream).