Skip to content

Commit

Permalink
Add Operation Instances for accessing Outputs during graph construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Corallus-Caninus committed May 1, 2022
1 parent f9f2ed6 commit f593359
Show file tree
Hide file tree
Showing 3 changed files with 87,875 additions and 60,389 deletions.
9 changes: 9 additions & 0 deletions src/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,15 @@ impl Operation {
}
}

/// Returns the given output edge.
/// The index argument is the index into the current operation's output array,
pub fn output(&self, index: usize) -> Output {
crate::Output {
operation: self.clone(),
index: index as c_int,
}
}

// TODO: Figure out what this does and document it.
#[allow(missing_docs)]
pub fn output_list_length(&self, arg_name: &str) -> Result<usize> {
Expand Down
Loading

0 comments on commit f593359

Please sign in to comment.