Updated on 2022-03-13 GMT+08:00

SetInputDynamicAIPP

Syntax

AIStatus SetInputDynamicAIPP(std::vector<std::shared_ptr<IAITensor>>& inData, std::shared_ptr<AippDynamicParaTensor> aippParms);

Function Description

Inserts the generated dynamic AIPP parameter AippDynamicParaTensor into the input tensor list. The insertion position is determined by the dynamicInputIndex and dynamicInputEdgeIndex2 attributes in the AIPP tensor. The two attributes are set by calling APIs in SetDynamicInputIndex and SetInputDynamicAIPP.

The AIPP tensor will be inserted after the tensor of the original input.

If multiple AippDynamicParaTensors need to be inserted, this API needs to be called for multiple times. In this case, if the dynamicInputIndex value of the newly inserted AippDynamicParaTensor is smaller than that of the existing AippDynamicParaTensor in the tensor list, or if the dynamicInputIndex value of the newly inserted AippDynamicParaTensor is equal to that of the existing AippDynamicParaTensor but the dynamicInputEdgeIndex value is smaller, the AIPP tensor will be inserted before the existing AippDynamicParaTensor. If the values of dynamicInputIndex and dynamicInputEdgeIndex are equal to those of the existing AippDynamicParaTensor in the tensor list, the newly inserted AippDynamicParaTensor overwrites the existing AippDynamicParaTensor.

When this API is called, the validity of dynamicInputIndex and dynamicInputEdgeIndex is not checked. That is, if the value of dynamicInputIndex is greater than the number of outputs of the model or the value of dynamicInputEdgeIndex is greater than the number of output edges corresponding to the input, no error is returned.

Parameter Description

Parameter

Input/Output

Type

Description

inData

Input

std::vector<std::shared_ptr<IAITensor>>&

List of input tensors

aippParms

Input

std::shared_ptr<AippDynamicParaTensor>

Dynamic AIPP tensor

Return Value

Parameter

Type

Description

-

AIStatus

If the parameter is set successfully, 0 is returned. If the input is invalid, other values are returned.

The AIStatus type is defined as follows:

AIStatus = uint32_t

Exception Handling

None

Restriction

None