SetInput
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/operator.h>
- Library file: libgraph.so
Function Usage
Sets the input source of the operator, that is, which operator's output is used as the input of the current operator.
The available SetInput methods are as follows:
To set output 0 of srcOprt as the input source of the current operator, use the first function prototype. In this case, the output name of srcOprt does not need to be specified.
To set an output other than output 0 of srcOprt as the input source of the current operator, use the second function prototype. In this case, the output name of srcOprt must be specified.
To set an output other than output 0 of srcOprt as the input source of the current operator, use the third function prototype. In this case, the output index of srcOprt must be specified.
Prototype
APIs taking string arguments will be deprecated in future releases. Use APIs taking non-string arguments instead.
1 2 3 4 5 6 7 8 9 | Operator &SetInput(const std::string &dst_name, const Operator &src_oprt) Operator &SetInput(const char_t *dst_name, const Operator &src_oprt) Operator &SetInput(const std::string &dst_name, const Operator &src_oprt, const std::string &name) Operator &SetInput(const char_t *dst_name, const Operator &src_oprt, const char_t *name) Operator &SetInput(const std::string &dst_name, const Operator &src_oprt, uint32_t index) Operator &SetInput(const char_t *dst_name, const Operator &src_oprt, uint32_t index) Operator &SetInput(uint32_t dst_index, const Operator &src_oprt, uint32_t src_index) Operator &SetInput(const char_t *dst_name, uint32_t dst_index, const Operator &src_oprt, const char_t *name) Operator &SetInput(const char_t *dst_name, uint32_t dst_index, const Operator &src_oprt) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
dst_name |
Input |
Input name of the operator. |
src_oprt |
Input |
Input operator object whose input name is dst_name. |
src_index |
Input |
Output ranked src_index of src_oprt. |
name |
Input |
Output name of src_oprt. |
index |
Input |
Output ranked index of src_oprt. |
dst_index |
Input |
Dynamic input that is ranked dst_index and whose name is dst_name. |
Returns
Scheduler itself.
Exception Handling
None
Constraints
None