MCPcopy Create free account
hub / github.com/OAID/Tengine / SetupConnection

Method SetupConnection

core/lib/graph.cpp:224–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224bool Graph::SetupConnection(Tensor* tensor, const StaticGraph* static_graph, const StaticTensor* static_tensor)
225{
226 /*will setup the tensor consumer and node inputs*/
227 for(unsigned int i = 0; i < static_tensor->consumer.size(); i++)
228 {
229 const NodeSynapse* p_synapse = &static_tensor->consumer[i];
230 const StaticNode* static_node = static_graph->node_list[p_synapse->node_index].get();
231
232 Node* node = FindNode(static_node->name);
233
234 /* create input port*/
235 node->SetInputPort(p_synapse->entry_index, tensor);
236
237 const NodePort* port = node->GetInputPort(p_synapse->entry_index);
238
239 tensor->AddConsumer(( NodePort* )port);
240 }
241
242 return true;
243}
244
245#if 0
246static int model_format_mapping(const std::string& fmt)

Callers

nothing calls this directly

Calls 6

FindNodeFunction · 0.85
getMethod · 0.80
SetInputPortMethod · 0.80
GetInputPortMethod · 0.80
AddConsumerMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected