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

Function get_graph_input_node

core/lib/tengine_c_api.cpp:552–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550}
551
552node_t get_graph_input_node(graph_t graph, int idx)
553{
554 GraphExecutor* executor = reinterpret_cast<GraphExecutor*>(graph);
555
556 Graph* real_graph = executor->GetOptimizedGraph();
557
558 if(idx >= ( int )real_graph->input_nodes.size())
559 {
560 set_tengine_errno(EINVAL);
561 return nullptr;
562 }
563
564 Node* node = real_graph->input_nodes[idx];
565
566 node->SetAttr(ATTR_API_GRAPH, executor);
567
568 return node;
569}
570
571int get_graph_output_node_number(graph_t graph)
572{

Callers 1

get_graph_input_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