pub struct ProgramLowering {
pub program: Option<SpatialProgram>,
pub statements: usize,
pub lowered: usize,
pub sections: usize,
pub missing: Vec<MissingStage>,
pub state: Vec<String>,
pub carried: Vec<String>,
}Expand description
What the whole-program front end made of a source.
statements is every top-level statement the walk considered a tensor op — the recognized ones plus
the ones no recognizer lifted. lowered is how many became sections. program is Some only when
those two agree AND the composer joined the sections, so program.is_some() IS the honest verdict.
Fields§
§program: Option<SpatialProgram>§statements: usize§lowered: usize§sections: usize§missing: Vec<MissingStage>§state: Vec<String>The state the walk found, by tensor name (first-appearance order) — every table a section updates in place.
carried: Vec<String>The part of Self::state a step carries to the next: without the tables the step assembles whole
(carried_state).
Implementations§
Source§impl ProgramLowering
impl ProgramLowering
Sourcepub fn whole(&self) -> Option<&SpatialProgram>
pub fn whole(&self) -> Option<&SpatialProgram>
The composed program, or None when the lowering is partial — there is deliberately no way to
reach a program without passing this check.
Sourcepub fn into_whole(self) -> Result<SpatialProgram, String>
pub fn into_whole(self) -> Result<SpatialProgram, String>
Self::whole, by value: the composed program, or the Self::refusal a partial lowering earns.
Trait Implementations§
Source§impl Clone for ProgramLowering
impl Clone for ProgramLowering
Source§fn clone(&self) -> ProgramLowering
fn clone(&self) -> ProgramLowering
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProgramLowering
impl RefUnwindSafe for ProgramLowering
impl Send for ProgramLowering
impl Sync for ProgramLowering
impl Unpin for ProgramLowering
impl UnsafeUnpin for ProgramLowering
impl UnwindSafe for ProgramLowering
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.