Updated on 2022-03-13 GMT+08:00

Graph::GetInstance

Obtains a graph instance. After a graph is created, this API can be used. This API is defined in graph.h.

Syntax

static std::shared_ptr<Graph> Graph::GetInstance(uint32_t graphID)

Parameter Description

Parameter

Description

Value Range

graphID

ID of the target graph

Graph ID configured in the configuration file

Return Value

Smart pointer to the graph

Error Codes

No.

Error Code

Description

1

HIAI_OK

The running is OK.

2

HIAI_GRAPH_PROTO_FILE_PARSE_FAILED

ParseFromString return failed.