In special case, `device_buffer(obj=None, size=<size>)` is exactly 
`allocate(<size>)`.
In all other cases, when `obj is not None`, `device_buffer` does allocation and 
initialization from offset, or returns a zero-copy slice (when obj is 
CudaBuffer).
So, `allocate` would not be appropriate. `device_buffer` would be more similar 
to `py_buffer`. 

Creating a `CudaBuffer` requires a context. For a better API, I propose 
introducing `context` keyword to `py_buffer` so that users could use 
`pa.py_buffer(<obj>, context=pa.cuda.Context())`.

[ Full content available at: https://github.com/apache/arrow/pull/2536 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to