| 222 | } |
| 223 | |
| 224 | bool 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 |
| 246 | static int model_format_mapping(const std::string& fmt) |
nothing calls this directly
no test coverage detected