MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / inputs

Function inputs

flow-rs/src/node/mod.rs:87–95  ·  view source on GitHub ↗
(local_key: u64, ty: &str)

Source from the content-addressed store, hash-verified

85}
86
87pub(crate) fn inputs(local_key: u64, ty: &str) -> Result<BTreeSet<String>> {
88 if let Some(node) = NodeSlice::registry_local().get(local_key).get(ty) {
89 Ok(node.info.inputs.iter().cloned().collect())
90 } else if let Some(graph) = GraphSlice::registry_local().get(local_key).get(ty) {
91 Ok(graph.info.inputs.iter().cloned().collect())
92 } else {
93 Err(anyhow!("unexpected node {}", ty))
94 }
95}
96
97pub(crate) fn outputs(local_key: u64, ty: &str) -> Result<BTreeSet<String>> {
98 if let Some(node) = NodeSlice::registry_local().get(local_key).get(ty) {

Callers 3

newMethod · 0.70
newMethod · 0.50
translate_nodeFunction · 0.50

Calls 1

getMethod · 0.45

Tested by

no test coverage detected