hi_mpi_vb_get_block

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

☓

Atlas A3 training products/Atlas A3 inference products

☓

Atlas A2 training products/Atlas A2 inference products

☓

Atlas 200I/500 A2 inference products

☓

Atlas inference products

☓

Atlas training products

☓

Function

Obtains a memory block.

Prototype

hi_vb_blk hi_mpi_vb_get_block(hi_vb_pool pool, hi_u64 blk_size, const hi_char *mmz_name)

Parameters

Parameter

Input/Output

Description

pool

Input

Memory pool ID, which is returned by the hi_mpi_vb_create_pool API.

blk_size

Input

Size of the memory block.

mmz_name

Input

Name of the memory pool. When pool is set to -1, the memory block can be obtained based on the memory pool name.

Returns

  • Success: The memory block handle is returned.
  • Failure: HI_VB_INVALID_HANDLE is returned, indicating that the memory block handle is invalid.