aclrtHostGetDevicePointer

Applicability

  

Supported

Atlas A3 Training Series Product

Atlas A2 Training Series Product/Atlas 800I A2 Inference Product

Atlas 200/500 A2 Inference Product

Atlas Inference Series Product

Atlas Training Series Product

Description

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

Prototype

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; else, failure. For details, see aclError.