Function: host_get_device_pointer
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
x |
|
√ |
|
√ |
|
x |
|
x |
|
x |
Description
Obtains the device memory address registered and mapped by the acl.rt.host_register or acl.rt.host_register_v2 API. This address cannot be used for memory operations, such as memory copy.
Prototype
- C Prototype
1aclError aclrtHostGetDevicePointer(void *pHost, void **pDevice, uint32_t flag)
- Python Function
1ptr_device, ret =acl.rt.host_get_device_pointer (ptr_host, flag)
Parameters
Parameter |
Description |
|---|---|
ptr_host |
Host memory address mapped and registered by calling acl.rt.host_register or acl.rt.host_register_v2. |
flag |
Reserved. The value is fixed at 0. |
Return Values
Return Value |
Description |
|---|---|
ptr_device |
Int, device memory address. |
ret |
Int, 0 on success; else failure. |
Parent topic: Host Memory Management