GetIrOutputInstanceInfo
Description
Obtains the corresponding output instantiation information based on the output index in the operator prototype definition.
Prototype
const AnchorInstanceInfo *GetIrOutputInstanceInfo(const size_t ir_index) const
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Output index in the operator IR prototype definition, starting from 0. |
Returns
Instantiation information of a specified input.
For details about the definition of AnchorInstanceInfo, see AnchorInstanceInfo.
Restrictions
None
Example
// Assume that KernelContext *context already exists.
auto extend_context = reinterpret_cast<ExtendedKernelContext *>(context);
for (size_t idx = 0; idx < extend_context->GetComputeNodeInfo()->GetOutputsNum(); ++idx) {
auto output_td = extend_context->GetIrOutputInstanceInfo(idx);
...
}
Parent topic: ExtendedKernelContext