pitrou commented on code in PR #43590:
URL: https://github.com/apache/arrow/pull/43590#discussion_r1774843887
##########
python/pyarrow/io.pxi:
##########
@@ -1446,6 +1446,41 @@ cdef class Buffer(_Weakrefable):
"""
return _wrap_device_allocation_type(self.buffer.get().device_type())
+ def copy(self, destination):
+ """
+ Copy the buffer to the destination device.
+
+ The buffer contents will be copied into a new buffer allocated onto
+ the destination MemoryManager or Device. It will return the new Buffer.
+ This function supports cross-device copies.
+
+ Parameters
+ ----------
+ destination : pyarrow.MemoryManager or pyarrow.Device
Review Comment:
Not required, but it may be nice to also allow a MemoryPool here.
--
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]