pub trait RuntimeState<B: NeuralBackend> {
type RetainedValues<'a>: Iterator<Item = &'a B::Tensor>
where Self: 'a,
B::Tensor: 'a;
// Required methods
fn layout(&self) -> &StateLayout;
fn retained_values(
&self,
ordinal: usize,
address: ExecutionUnitAddress,
) -> Result<Self::RetainedValues<'_>, StateError>;
}Expand description
Mutable state realization consumed by generic resident and layerwise engines.
Required Associated Types§
Sourcetype RetainedValues<'a>: Iterator<Item = &'a B::Tensor>
where
Self: 'a,
B::Tensor: 'a
type RetainedValues<'a>: Iterator<Item = &'a B::Tensor> where Self: 'a, B::Tensor: 'a
Concrete iterator retaining native values for one execution unit.
Required Methods§
Sourcefn layout(&self) -> &StateLayout
fn layout(&self) -> &StateLayout
Returns the exact layout used to create this realization.
Sourcefn retained_values(
&self,
ordinal: usize,
address: ExecutionUnitAddress,
) -> Result<Self::RetainedValues<'_>, StateError>
fn retained_values( &self, ordinal: usize, address: ExecutionUnitAddress, ) -> Result<Self::RetainedValues<'_>, StateError>
Borrows tensors retained by one execution unit without cloning handles.
The flat ordinal addresses policy storage while address preserves
architecture-group semantics for composite and shared state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".