OK, `new_buffer` and `buffer_from_data` arguments make sense. In total, there 
are four methods of creating CudaBuffer instances:
1. `Context.new_buffer` - that's `allocate`
2. `Contex.buffer_from_data` - data is always copied (from host to device or 
from device to device)
3. `CudaBuffer.slice` - zero-copy slice
4. `Context.open_ipc_buffer` - create zero-copy buffer from ipc handle or from 
a buffer containing the ipc handle. Would it make sense to call it 
`buffer_from_ipc_handle` or similar?

About the suggestion: replace `py_buffer` with `as_buffer`, if that makes a 
difference, otherwise ignore.
Btw, `py_buffer(<Python bytes object>)` makes a copy, so it is not a pure 
logical buffer creator.

[ 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