AddOp
Description
Registers an unconnected operator with a graph for query and object obtaining.
Prototype
graphStatus AddOp(const ge::Operator &op);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
op |
Input |
Operator to be added. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
SUCCESS on success; FAILED on failure. |
Restrictions
This API is optional. For switchover between functions, an operator object may be a local variable and cannot be obtained by functions. In this case, the operator can be registered with the graph to obtain the previously created operator object. After the operator object is registered in the graph, the operator object exists unless the graph is destroyed.
Parent topic: Graph Construction APIs