pub struct ExecutionPlan {
pub order: Vec<NodeId>,
pub alternatives: HashMap<NodeId, AlternativeSet>,
pub generation: u64,
}Expand description
Per-realize execution plan. Built by compile_plan.
alternatives is sparse — view ops, Op::Const, and ops
op_to_op_kind returns None for get no entry. The executor’s
per-node dispatch reads alternatives.get(&id) and either takes
the winner (top entry after rank) or, in the long-term shape,
hands the full set to the runtime selector (Picker 2) for
layer-3-telemetry-driven choice.
Fields§
§order: Vec<NodeId>Topological order — same shape the executor walks.
alternatives: HashMap<NodeId, AlternativeSet>One AlternativeSet per kernel-bearing node. Sparse.
generation: u64SystemTopology generation counter snapshotted at
compile_plan time. The executor (Phase 4.3) checks this
against crate::dispatch::topology_generation() at every
dispatch-chunk boundary; mismatch surfaces
Error::TopologyChanged so the realize layer can rebuild
the plan against the fresh topology.
0 for ExecutionPlan::empty() — empty plans by definition
have no alternatives to invalidate, so the executor’s chunk-
boundary check skips them.
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn alternatives(&self, node: NodeId) -> Option<&AlternativeSet>
pub fn alternatives(&self, node: NodeId) -> Option<&AlternativeSet>
Read-only handle to a node’s alternative set. None for
nodes outside the plan’s map.
Sourcepub fn alternatives_mut(&mut self, node: NodeId) -> Option<&mut AlternativeSet>
pub fn alternatives_mut(&mut self, node: NodeId) -> Option<&mut AlternativeSet>
Mutable handle — used by post-plan refinement passes (Phase 3’s Judge integration may re-rank top-N after the plan is built).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionPlan
impl RefUnwindSafe for ExecutionPlan
impl Send for ExecutionPlan
impl Sync for ExecutionPlan
impl Unpin for ExecutionPlan
impl UnsafeUnpin for ExecutionPlan
impl UnwindSafe for ExecutionPlan
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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