pub struct GraphDataflow {
pub live_tensors: HashMap<usize, HashSet<usize>>,
pub dependencies: HashMap<usize, HashSet<usize>>,
pub uses: HashMap<usize, HashSet<usize>>,
}Expand description
Dataflow analysis for einsum graphs.
Fields§
§live_tensors: HashMap<usize, HashSet<usize>>Live tensors at each node
dependencies: HashMap<usize, HashSet<usize>>Tensor dependencies
uses: HashMap<usize, HashSet<usize>>Reverse dependencies (uses)
Implementations§
Source§impl GraphDataflow
impl GraphDataflow
Sourcepub fn is_tensor_live(&self, node: usize, tensor: usize) -> bool
pub fn is_tensor_live(&self, node: usize, tensor: usize) -> bool
Check if a tensor is live at a node.
Sourcepub fn get_dependencies(&self, tensor: usize) -> HashSet<usize>
pub fn get_dependencies(&self, tensor: usize) -> HashSet<usize>
Get dependencies of a tensor.
Trait Implementations§
Source§impl Clone for GraphDataflow
impl Clone for GraphDataflow
Source§fn clone(&self) -> GraphDataflow
fn clone(&self) -> GraphDataflow
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphDataflow
impl Debug for GraphDataflow
Auto Trait Implementations§
impl Freeze for GraphDataflow
impl RefUnwindSafe for GraphDataflow
impl Send for GraphDataflow
impl Sync for GraphDataflow
impl Unpin for GraphDataflow
impl UnwindSafe for GraphDataflow
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