AddOp
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/graph.h>
- Library file: libgraph.so
Function Usage
Registers an unconnected operator with a graph for query and object obtaining.
Prototype
1 | graphStatus AddOp(const ge::Operator &op) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
op |
Input |
Operator to be added. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
graphStatus |
SUCCESS: Operation succeeded. FAILED: Operation failed. |
Constraints
This API is optional. For a 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.