pub enum Distribution<T: RngFloatSupported> {
Uniform {
lo: T::Scalar,
hi: T::Scalar,
},
Normal {
mean: T::Scalar,
std: T::Scalar,
},
LogNormal {
mean: T::Scalar,
std: T::Scalar,
},
Poisson {
lambda: f64,
},
Exponential {
lambda: T::Scalar,
},
Beta {
alpha: T::Scalar,
beta: T::Scalar,
},
Cauchy {
loc: T::Scalar,
scale: T::Scalar,
},
Gamma {
shape: T::Scalar,
scale: T::Scalar,
},
Discrete {
weights: GpuRef<f32>,
},
}Expand description
Every distribution the cuRAND surface is intended to expose.
Variants that aren’t yet wired to a kernel return a tagged
LibraryError from FillRequest::fill.
Variants§
Uniform
Normal
LogNormal
Poisson
cuRAND’s Poisson is parameterised by a f64 lambda regardless of
the float output dtype — preserving that here so the type lines
up with curandGeneratePoisson.
Exponential
Beta
Cauchy
Gamma
Discrete
Auto Trait Implementations§
impl<T> Freeze for Distribution<T>
impl<T> !RefUnwindSafe for Distribution<T>
impl<T> Send for Distribution<T>
impl<T> Sync for Distribution<T>
impl<T> Unpin for Distribution<T>
impl<T> UnsafeUnpin for Distribution<T>
impl<T> !UnwindSafe for Distribution<T>
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
Mutably borrows from an owned value. Read more