Function: ptr_to_bytes
C Prototype |
None |
|---|---|
Python Function |
bytes_out = acl.util.ptr_to_bytes(ptr, size) |
Function Usage |
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) You are advised to use acl.util.bytes_to_ptr for further computation, because acl.util.ptr_to_bytes deteriorates data performance. |
Parent topic: util Module