pub struct ProgramImport<'a> {
pub program: &'a SemanticProgram,
pub bindings: Option<&'a ProgramBindings>,
pub roots: &'a [ProgramValue],
pub input_map: &'a [(ProgramValue, ProgramValue)],
}Expand description
Read-only request to import the dependency closure of ordered roots.
Fields§
§program: &'a SemanticProgramImmutable source semantic program.
bindings: Option<&'a ProgramBindings>Tensor bindings frozen with the source program, when structure and bindings should travel together.
A structural import passes None so symbolic extents stay symbolic; a
caller that wants the frozen defaults re-attaches them afterwards.
roots: &'a [ProgramValue]Ordered source roots to remap; empty and duplicate roots are valid.
input_map: &'a [(ProgramValue, ProgramValue)]Source inputs that already exist in the destination.
A mapped source input reuses the destination value (and its metadata) instead of creating a fresh input, which is how a derivative program lands back on the leaves it was differentiated from.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ProgramImport<'a>
impl<'a> !UnwindSafe for ProgramImport<'a>
impl<'a> Freeze for ProgramImport<'a>
impl<'a> Send for ProgramImport<'a>
impl<'a> Sync for ProgramImport<'a>
impl<'a> Unpin for ProgramImport<'a>
impl<'a> UnsafeUnpin for ProgramImport<'a>
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