pub struct LayeredPipelineSchedule<'a> { /* private fields */ }Expand description
Backend-neutral lifecycle for the pipeline ingress phase of a layered graph.
Architectures declare semantic group kinds and request optionality while concrete backends report only whether optional encoder roots have work. The runtime derives all downstream activity, admits dependency-ready compatible batches, and owns completion transitions. Pipeline backends therefore share the same graph lifecycle instead of reconstructing it around native streams and routes.
Implementations§
Source§impl<'a> LayeredPipelineSchedule<'a>
impl<'a> LayeredPipelineSchedule<'a>
Sourcepub fn try_new<E>(
graph: &'a ExecutionGraph,
group_contracts: impl IntoIterator<Item = (ArchitectureGroupKind, bool)>,
request_group_active: impl FnMut(usize) -> Result<bool, E>,
) -> Result<Self, E>where
E: From<LayeredPipelineScheduleError>,
pub fn try_new<E>(
graph: &'a ExecutionGraph,
group_contracts: impl IntoIterator<Item = (ArchitectureGroupKind, bool)>,
request_group_active: impl FnMut(usize) -> Result<bool, E>,
) -> Result<Self, E>where
E: From<LayeredPipelineScheduleError>,
Creates the pipeline ingress lifecycle from canonical architecture contracts.
Each contract pairs a group’s semantic kind with its declared request
optionality. request_group_active is called only for optional encoder
roots. Mandatory encoders, decoder ingress, and finalization always run;
structural merge activity is derived from dependency activity; and
prediction is a later phase.
Sourcepub fn is_active(&self, group: usize) -> Option<bool>
pub fn is_active(&self, group: usize) -> Option<bool>
Returns whether a group participates in this pipeline ingress pass.
Sourcepub fn ready_groups(&self) -> impl Iterator<Item = usize> + '_
pub fn ready_groups(&self) -> impl Iterator<Item = usize> + '_
Returns dependency-ready groups in stable architecture order.
Sourcepub fn compatible_batch(
&self,
compatible: impl FnMut(usize, usize) -> bool,
) -> Vec<usize>
pub fn compatible_batch( &self, compatible: impl FnMut(usize, usize) -> bool, ) -> Vec<usize>
Selects a deterministic maximal compatible subset of ready groups.
Sourcepub fn dependencies(&self, group: usize) -> Option<&[usize]>
pub fn dependencies(&self, group: usize) -> Option<&[usize]>
Returns dependency slots in architecture declaration order.
Sourcepub fn started(
&mut self,
group: usize,
) -> Result<Vec<usize>, LayeredPipelineScheduleError>
pub fn started( &mut self, group: usize, ) -> Result<Vec<usize>, LayeredPipelineScheduleError>
Commits architecture setup for a dependency-ready group.
The returned producer slots no longer need to retain their outputs for another consumer after this group has captured its dependencies.
Sourcepub fn ordered(
&mut self,
group: usize,
) -> Result<(), LayeredPipelineScheduleError>
pub fn ordered( &mut self, group: usize, ) -> Result<(), LayeredPipelineScheduleError>
Commits one successfully submitted group and unlocks its dependents.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Returns whether every architecture group has completed this phase.