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

Function get_graph_output_node

core/lib/tengine_c_api.cpp:580–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580node_t get_graph_output_node(graph_t graph, int idx)
581{
582 GraphExecutor* executor = reinterpret_cast<GraphExecutor*>(graph);
583
584 Graph* real_graph = executor->GetOptimizedGraph();
585
586 if(idx >= ( int )real_graph->output_nodes.size())
587 {
588 set_tengine_errno(EINVAL);
589 return nullptr;
590 }
591
592 Node* node = real_graph->output_nodes[idx];
593
594 node->SetAttr(ATTR_API_GRAPH, executor);
595
596 return node;
597}
598
599tensor_t get_graph_output_tensor(graph_t graph, int output_node_idx, int tensor_idx)
600{

Callers 1

get_graph_output_tensorFunction · 0.85

Calls 4

set_tengine_errnoFunction · 0.85
GetOptimizedGraphMethod · 0.45
sizeMethod · 0.45
SetAttrMethod · 0.45

Tested by

no test coverage detected