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

Function get_node_dump_buffer

core/lib/tengine_c_api.cpp:1391–1416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1389}
1390
1391int get_node_dump_buffer(node_t node, void** buf, int buf_size)
1392{
1393 Node* real_node = reinterpret_cast<Node*>(node);
1394 GraphExecutor* executor = any_cast<GraphExecutor*>(real_node->GetAttr(ATTR_API_GRAPH));
1395
1396 /* should only be called, after prerun done */
1397 if(!executor->PrerunDone())
1398 {
1399 set_tengine_errno(EAGAIN);
1400 return -1;
1401 }
1402
1403 NodeDumpMsg msg;
1404
1405 msg.action = NODE_DUMP_ACTION_GET;
1406 msg.node_name = real_node->GetName().c_str();
1407 msg.buf = buf;
1408 msg.buf_size = buf_size;
1409
1410 int ret = get_graph_attr(executor, ATTR_GRAPH_NODE_DUMP, &msg, sizeof(msg));
1411
1412 if(ret == 0)
1413 return msg.ret_number;
1414
1415 return -1;
1416}
1417
1418int do_graph_perf_stat(graph_t graph, int action)
1419{

Callers 1

mainFunction · 0.85

Calls 6

set_tengine_errnoFunction · 0.85
get_graph_attrFunction · 0.85
PrerunDoneMethod · 0.80
GetNameMethod · 0.80
GetAttrMethod · 0.45
c_strMethod · 0.45

Tested by 1

mainFunction · 0.68