vpc_set_chn_workspace

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

x

Atlas inference product

x

Atlas 200I/500 A2 inference product

Description

Allocates internal buffers based on the maximum width and height of the input and output images. The allocated buffers are 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)
    

Parameters

Parameter

Description

chn

Int, channel ID for image processing.

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 two functions of remapping and affine transformation are involved in an application, the hi_vpc_workspace_param array may include two elements, where hi_vpc_workspace_param["func"] of one element is set to REMAP, and hi_vpc_workspace_param["func"] of the other element is set to AFFINE.

param_cnt

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

Return Value

Return Value

Description

ret

Int, error code.
  • 0 indicates success.
  • Other values indicate failure. For details, see VPC Return Codes.

Restrictions

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