pub enum RngGeneratorKind {
PseudoDefault,
Philox4_32_10,
XorWow,
Mrg32K3A,
Mtgp32,
Sobol32,
ScrambledSobol32,
Sobol64,
ScrambledSobol64,
}Expand description
Public mirror of [sys::curandRngType_t] so callers don’t have to
take a cudarc::curand::sys::* symbol on their public API. The
numeric values match cuRAND.
Variants§
PseudoDefault
CURAND_RNG_PSEUDO_DEFAULT — XORWOW today; defined by cuRAND.
Philox4_32_10
CURAND_RNG_PSEUDO_PHILOX4_32_10. Recommended high-quality
pseudo-RNG. Counter-based, friendly to SIMD/SIMT.
XorWow
CURAND_RNG_PSEUDO_XORWOW. Default in cuRAND <= 11.
Mrg32K3A
CURAND_RNG_PSEUDO_MRG32K3A. L’Ecuyer’s MRG.
Mtgp32
CURAND_RNG_PSEUDO_MTGP32. Mersenne Twister 32-bit.
Sobol32
CURAND_RNG_QUASI_SOBOL32. Quasi-random 32-bit Sobol.
ScrambledSobol32
CURAND_RNG_QUASI_SCRAMBLED_SOBOL32.
Sobol64
CURAND_RNG_QUASI_SOBOL64.
ScrambledSobol64
CURAND_RNG_QUASI_SCRAMBLED_SOBOL64.
Implementations§
Source§impl RngGeneratorKind
impl RngGeneratorKind
Sourcepub fn is_quasi(self) -> bool
pub fn is_quasi(self) -> bool
Whether this kind is a quasi-random (Sobol) generator. Quasi
generators must be configured with
[set_quasi_random_dimensions] before any fill, and they do
not accept a pseudo-random seed.
Sourcepub fn is_quasi_64(self) -> bool
pub fn is_quasi_64(self) -> bool
64-bit Sobol vs. 32-bit Sobol. Kept separate from Self::is_quasi
so callers can pick the matching curandSetQuasiRandomGeneratorDimensions
argument width without re-matching.
pub fn to_sys(self) -> curandRngType_t
Trait Implementations§
Source§impl Clone for RngGeneratorKind
impl Clone for RngGeneratorKind
Source§fn clone(&self) -> RngGeneratorKind
fn clone(&self) -> RngGeneratorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RngGeneratorKind
impl Debug for RngGeneratorKind
Source§impl Default for RngGeneratorKind
impl Default for RngGeneratorKind
Source§fn default() -> RngGeneratorKind
fn default() -> RngGeneratorKind
Source§impl Hash for RngGeneratorKind
impl Hash for RngGeneratorKind
Source§impl PartialEq for RngGeneratorKind
impl PartialEq for RngGeneratorKind
impl Copy for RngGeneratorKind
impl Eq for RngGeneratorKind
impl StructuralPartialEq for RngGeneratorKind
Auto Trait Implementations§
impl Freeze for RngGeneratorKind
impl RefUnwindSafe for RngGeneratorKind
impl Send for RngGeneratorKind
impl Sync for RngGeneratorKind
impl Unpin for RngGeneratorKind
impl UnsafeUnpin for RngGeneratorKind
impl UnwindSafe for RngGeneratorKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.