GetIrInputInstanceInfo
Description
Obtains the corresponding input instantiation information based on the input index in the operator prototype definition.
Prototype
const AnchorInstanceInfo * GetIrInputInstanceInfo (const size_t ir_index) const
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Input 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()->GetIrInputsNum(); ++idx) {
auto input_td = extend_context->GetIrInputInstanceInfo(idx);
...
}
Parent topic: ExtendedKernelContext