jorisvandenbossche commented on code in PR #43590:
URL: https://github.com/apache/arrow/pull/43590#discussion_r1775334692


##########
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:
   We don't have a way to map a given MemoryPool to a device manager (AFAIK), 
so in that case you mean to use a different API under the hood to copy to the 
memory pool? (`Buffer::CopySlice` seems to allow that, or first explicitly 
allocate a new Buffer of the correct size using the memory pool and then 
copying the data to it?)



-- 
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]

Reply via email to