aclrtHostGetDevicePointer

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

x

Atlas training product

x

Description

Obtains the device memory address registered and mapped by the aclrtHostRegister or aclrtHostRegisterV2 API. This address cannot be used for memory operations, such as memory copy.

Prototype

1
aclError aclrtHostGetDevicePointer(void *pHost, void **pDevice, uint32_t flag)

Parameters

Parameter

Input/Output

Description

pHost

Input

Host memory address registered and mapped by the aclrtHostRegisterV2 API.

pDevice

Output

Device memory address mapped from the host memory.

flag

Input

Reserved. The value is fixed at 0.

Returns

0 on success; otherwise, failure. For details, see aclError.