jorisvandenbossche commented on code in PR #40385:
URL: https://github.com/apache/arrow/pull/40385#discussion_r1557109289
##########
python/pyarrow/array.pxi:
##########
@@ -1835,23 +1835,25 @@ cdef class Array(_PandasConvertible):
This is a low-level function intended for expert users.
"""
cdef:
- void* c_ptr = _as_c_pointer(in_ptr)
+ ArrowDeviceArray* c_device_array =
<ArrowDeviceArray*>_as_c_pointer(in_ptr)
void* c_type_ptr
shared_ptr[CArray] c_array
+ if c_device_array.device_type == 2:
Review Comment:
That's for DLPack, and also those definitions are the same, I would prefer
to not mix them in our code. But added a similar line to libarrow.pxd to expose
`ARROW_DEVICE_CUDA`, which also makes the above easier to read
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]