Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Obtains the memory attribute information, including whether the memory is on the host or device and the page table size.
1 | aclError aclrtPointerGetAttributes(const void *ptr, aclrtPtrAttributes *attributes) |
1 | attributes, ret = acl.rt.pointer_get_attributes(ptr) |
Parameter |
Description |
|---|---|
ptr |
Int, memory address. Do not pass the device address mapped by acl.rt.host_register or the device address obtained by calling acl.rt.host_get_device_pointer. Otherwise, undefined behavior may occur. |
Return Value |
Description |
|---|---|
attributes |
Dict, memory attributes. For details, see aclrtPtrAttributes. |
ret |
Int, error code. 0 on success; else, failure. |