pub struct RealtimeGenerationBranch<MB, S, R, C> { /* private fields */ }Expand description
Unpublished branch of every mutable component in one realtime transition.
Implementations§
Source§impl<MB, S, R, C> RealtimeGenerationBranch<MB, S, R, C>
impl<MB, S, R, C> RealtimeGenerationBranch<MB, S, R, C>
Sourcepub fn model_state_mut(&mut self) -> &mut MB
pub fn model_state_mut(&mut self) -> &mut MB
Mutably borrows the transition-local model/cache state.
Sourcepub const fn schedule_state(&self) -> &RealtimeFrameScheduleState
pub const fn schedule_state(&self) -> &RealtimeFrameScheduleState
Borrows the transition-local delayed-frame state.
Sourcepub fn schedule_state_mut(&mut self) -> &mut RealtimeFrameScheduleState
pub fn schedule_state_mut(&mut self) -> &mut RealtimeFrameScheduleState
Mutably borrows the transition-local delayed-frame state.
Sourcepub fn samplers(&self) -> &[S]
pub fn samplers(&self) -> &[S]
Borrows transition-local sampler states in text-plus-depth order.
Sourcepub const fn random_state(&self) -> Option<&R>
pub const fn random_state(&self) -> Option<&R>
Borrows transition-local backend random state.
Sourcepub fn attach_submission_completion(
&mut self,
completion: C,
) -> Result<(), RealtimeCompletionAttachmentError>
pub fn attach_submission_completion( &mut self, completion: C, ) -> Result<(), RealtimeCompletionAttachmentError>
Attaches the one exact completion returned by backend submission.
Sourcepub fn decision_driver<B>(
&self,
plan: SequentialDecisionPlan<B::Token>,
temperatures: Vec<f32>,
) -> Result<SequentialDecisionDriver<B, S>, SequentialDecisionPlanError>
pub fn decision_driver<B>( &self, plan: SequentialDecisionPlan<B::Token>, temperatures: Vec<f32>, ) -> Result<SequentialDecisionDriver<B, S>, SequentialDecisionPlanError>
Creates the existing sequential decision driver from cloned branch-local sampler and random state.
The driver remains the sole state machine for forced, sampled, and diagnostic decisions. State is adopted back only after it finishes.
Sourcepub fn adopt_decision_driver<B>(
&mut self,
driver: SequentialDecisionDriver<B, S>,
) -> Result<(), SequentialDecisionError<B::Error>>where
B: SamplingBackend<RandomState = R>,
S: Sampler<B>,
pub fn adopt_decision_driver<B>(
&mut self,
driver: SequentialDecisionDriver<B, S>,
) -> Result<(), SequentialDecisionError<B::Error>>where
B: SamplingBackend<RandomState = R>,
S: Sampler<B>,
Atomically adopts sampler and random state from a completed existing sequential decision driver.
An incomplete driver returns an error and leaves this branch unchanged.