pub struct SimulationRunner<S: Simulatable> { /* private fields */ }Expand description
Parallel batch simulation runner.
Generates all random numbers upfront (no RNG in the hot loop),
steps paths in parallel via rayon, and stores results in SOA layout.
The model is cloned for each path, so implementations must be Clone.
Implementations§
Source§impl<S: Simulatable> SimulationRunner<S>
impl<S: Simulatable> SimulationRunner<S>
pub fn new(model: S, config: SimulationConfig) -> Self
Sourcepub fn run(&self) -> SimulationResult<S::Output>
pub fn run(&self) -> SimulationResult<S::Output>
Run the simulation and return results in SOA layout.
Auto Trait Implementations§
impl<S> Freeze for SimulationRunner<S>where
S: Freeze,
impl<S> RefUnwindSafe for SimulationRunner<S>where
S: RefUnwindSafe,
impl<S> Send for SimulationRunner<S>
impl<S> Sync for SimulationRunner<S>
impl<S> Unpin for SimulationRunner<S>where
S: Unpin,
impl<S> UnsafeUnpin for SimulationRunner<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SimulationRunner<S>where
S: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more