#[non_exhaustive]pub enum RngMsg {
Fill(Box<dyn RngDispatch>),
SetSeed {
seed: u64,
reply: Sender<Result<(), GpuError>>,
},
SetGenerator {
kind: RngGeneratorKind,
reply: Sender<Result<(), GpuError>>,
},
FillUniformF32 {
dst: GpuRef<f32>,
reply: Sender<Result<(), GpuError>>,
},
FillUniformF64 {
dst: GpuRef<f64>,
reply: Sender<Result<(), GpuError>>,
},
FillUniformU32 {
dst: GpuRef<u32>,
reply: Sender<Result<(), GpuError>>,
},
FillNormalF32 {
dst: GpuRef<f32>,
mean: f32,
std: f32,
reply: Sender<Result<(), GpuError>>,
},
FillNormalF64 {
dst: GpuRef<f64>,
mean: f64,
std: f64,
reply: Sender<Result<(), GpuError>>,
},
FillLogNormalF32 {
dst: GpuRef<f32>,
mean: f32,
std: f32,
reply: Sender<Result<(), GpuError>>,
},
Reseed {
seed: u64,
reply: Sender<Result<(), GpuError>>,
},
}Expand description
Public messages for RngActor.
Two-track API:
- Modern —
RngMsg::Fill,RngMsg::SetSeed,RngMsg::SetGenerator. Callers build aFillRequest<T>, wrap it inBox<dyn RngDispatch>, and send it asRngMsg::Fill(Box::new(req)). - Legacy —
Fill{Uniform,Normal,LogNormal}*plusReseed, preserved for F2 callers. Marked#[deprecated].
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Fill(Box<dyn RngDispatch>)
Type-erased dispatch: see RngDispatch.
SetSeed
Re-seed the active generator (no-op for quasi generators).
SetGenerator
Tear down the current generator and reconstruct it as kind.
Pseudo→quasi (or vice-versa) is supported. Quasi generators
take effect with the default 1-dimensional Sobol; use
[sobol::SetDimensions] to widen.
FillUniformF32
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
FillUniformF64
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
FillUniformU32
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
FillNormalF32
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
FillNormalF64
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
FillLogNormalF32
👎Deprecated: use RngMsg::Fill(Box::new(FillRequest { … })) instead
Fields
Reseed
👎Deprecated: use RngMsg::SetSeed { seed, reply } instead
Auto Trait Implementations§
impl Freeze for RngMsg
impl !RefUnwindSafe for RngMsg
impl Send for RngMsg
impl !Sync for RngMsg
impl Unpin for RngMsg
impl UnsafeUnpin for RngMsg
impl !UnwindSafe for RngMsg
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