pub struct SharedWeightLayout {
pub arena_size: usize,
pub slots: Vec<WeightSlot>,
}Expand description
Persistent parameter slots extracted from a forward MemoryPlan.
Fields§
§arena_size: usize§slots: Vec<WeightSlot>Implementations§
Sourcepub fn from_forward(graph: &Graph, plan: &MemoryPlan) -> Self
pub fn from_forward(graph: &Graph, plan: &MemoryPlan) -> Self
Collect Op::Param slots from a forward memory plan (by param name).
Sourcepub fn apply_to_plan(&self, graph: &Graph, plan: &mut MemoryPlan)
pub fn apply_to_plan(&self, graph: &Graph, plan: &mut MemoryPlan)
Map backward-graph Op::Param nodes to the forward weight offsets.
Trait Implementations§
Source§fn clone(&self) -> SharedWeightLayout
fn clone(&self) -> SharedWeightLayout
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§fn eq(&self, other: &SharedWeightLayout) -> bool
fn eq(&self, other: &SharedWeightLayout) -> bool
Tests for
self and other values to be equal, and is used by ==.Auto Trait Implementations§
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