Function: ptr_to_bytes
C Prototype |
None |
|---|---|
Python Function |
bytes_out = acl.util.ptr_to_bytes(ptr, size) |
Function Description |
Converts void* data to a bytes object so that Python code can directly access the data. |
Input Description |
ptr: int, pointer address in the C language. It is the start address of the data that can be accessed. size: int, data size, in bytes. |
Return Value |
bytes_out: bytes object. |
Restrictions |
None |
Precautions |
Example modification: bytes_out = acl.util.ptr_to_bytes(bytes_ptr, size) The acl.util.ptr_to_bytes function may cause data performance deterioration. Therefore, you are advised to use the data of the acl.util.bytes_to_ptr function for subsequent calculation. |
Parent topic: util Module