You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/09 15:40:23 UTC

[GitHub] [arrow] lidavidm commented on a change in pull request #12341: ARROW-15579: [C++] Add MemoryManager::CopyBuffer(const Buffer&)

lidavidm commented on a change in pull request #12341:
URL: https://github.com/apache/arrow/pull/12341#discussion_r802800399



##########
File path: cpp/src/arrow/device.h
##########
@@ -119,13 +119,16 @@ class ARROW_EXPORT MemoryManager : public std::enable_shared_from_this<MemoryMan
   /// The buffer will be allocated in the device's memory.
   virtual Result<std::unique_ptr<Buffer>> AllocateBuffer(int64_t size) = 0;
 
-  // XXX Should this take a `const Buffer&` instead
   /// \brief Copy a Buffer to a destination MemoryManager
   ///
   /// See also the Buffer::Copy shorthand.
   static Result<std::shared_ptr<Buffer>> CopyBuffer(
       const std::shared_ptr<Buffer>& source, const std::shared_ptr<MemoryManager>& to);
 
+  /// \brief Copy a Buffer to a destination MemoryManager
+  static Result<std::unique_ptr<Buffer>> CopyBuffer(
+      const Buffer& source, const std::shared_ptr<MemoryManager>& to);

Review comment:
       Renamed, though I kept the signature since we do want to be able to know the device of the source buffer.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org