Function: numpy_contiguous_to_ptr
This API will be deprecated. Use acl.util.bytes_to_ptr instead.
C Prototype |
None |
|---|---|
Python Function |
ptr, data_out = acl.util.numpy_contiguous_to_ptr(data_in) |
Function Description |
Obtains the memory data pointer address of the numpy.ndarray array. If the input numpy.ndarray array is non-contiguous in the memory, the memory is converted into contiguous rows, and then the converted numpy.ndarray array is converted into the memory data pointer address. |
Input Description |
data_in: data of the NumPy type. |
Return Value |
ptr: int, data that can be accessed by the C language. data_out: NumPy data. If the input NumPy array data_in memory is not continuous, the return value data_out is the NumPy array after the memory is converted into continuous lines. |
Restrictions |
If data of the int type is accessed, the memory data pointer address of the numpy.ndarray object needs to be converted to int. |
Precautions |
|