Skip to main content

NormalParam

Trait NormalParam 

Source
pub trait NormalParam<S>: Sized {
    // Required method
    fn from_scalar(s: S) -> Self;
}
Expand description

Helper trait so the enqueue_normal / log_normal paths can convert the parameter scalar (always T::Scalar) into the T value cudarc::curand::result::NormalFill::fill actually accepts. For both f32 and f64, scalar == self, so this is identity.

Required Methods§

Source

fn from_scalar(s: S) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NormalParam<f32> for f32

Source§

fn from_scalar(s: f32) -> Self

Source§

impl NormalParam<f64> for f64

Source§

fn from_scalar(s: f64) -> Self

Implementors§