hi_mpi_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 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Apply for a temporary cache. For each channel, this API can be set only once and cannot be modified later.

Due to hardware restrictions, you need to call this API to allocate a temporary buffer required for storing task process data when you execute a remapping or affine transformation task. 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

hi_s32 hi_mpi_vpc_set_chn_workspace(hi_vpc_chn chn, hi_vpc_workspace_param *workspace_param, hi_u32 param_cnt)

Parameters

Parameter

Input/Output

Description

chn

Input

Channel ID for image processing.

Atlas 350 Accelerator Card: The value range is [0, 256). The maximum number of channels is 256.

Atlas A3 training product/Atlas A3 inference product: The value range is [0, 256). The maximum number of channels is 256.

Atlas A2 training product/Atlas A2 inference product: The value range is [0, 256). The maximum number of channels is 256.

Atlas 200I/500 A2 inference product: The value range is [0, 128). The maximum number of channels is 128.

Atlas inference product: The value range is [0, 256). The maximum number of channels is 256.

workspace_param

Input

Pointer to the workspace_param array.

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 application, the workspace_param array can contain two elements. Set hi_vpc_workspace_param.func of the elements to REMAP and AFFINE, respectively.

param_cnt

Input

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

Returns