vpc_set_chn_workspace

Applicability

Product

Supported (√/x)

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas training products

x

Atlas inference products

x

Atlas 200I/500 A2 inference products

Function Usage

When this API is called, the system allocates an internal temporary buffer based on the maximum width and height of the input and output images. The allocated buffer is automatically released when the channel is destroyed.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_vpc_set_chn_workspace(hi_vpc_chn chn, hi_vpc_workspace_param *workspace_param, hi_u32 param_cnt)
    
  • Python Function
    1
    ret = acl.himpi.vpc_set_chn_workspace(chn, workspace_param, param_cnt)
    

Parameter Description

Parameter

Description

chn

Int, channel ID for image processing.
  • Atlas A2 training products/Atlas A2 inference products: The value range of this parameter is [0, 256). The maximum number of channels is 256.
  • Atlas 200I/500 A2 inference products: The value range of this parameter is [0, 128). The maximum number of channels is 128.

workspace_param

List, array with elements of type hi_vpc_workspace_param dictionary.

The value of hi_vpc_workspace_param["func"] needs to be set based on the used remapping or affine transformation function.

If the remapping and affine transformation functions both are involved in an app, the hi_vpc_workspace_param array can contain two elements. Set hi_vpc_workspace_param["func"] of two elements to REMAP and AFFINE, respectively.

param_cnt

Int, array length, which must be the same as the length of the workspace_param array.

Return Value Description

Return Value

Description

ret

Int, error code.

Restrictions

For each channel, this API can be set only once and cannot be modified later.