alanstoate opened a new pull request, #41477:
URL: https://github.com/apache/arrow/pull/41477

   ### Rationale for this change
   Currently ```MemoryManager``` objects define functionality to Copy or View 
entire buffers. Occasionally there is the need to only copy a single value or 
slice from a buffer (see 
https://github.com/apache/arrow/pull/39770#discussion_r1470135438). It's 
overkill to do a bunch of whole Buffer operations and manually slicing just to 
copy 4 or 8 bytes.
   
   Instead we can add new methods to the ```MemoryManager``` interface such as 
```CopyBufferSlice``` etc.
   
   ### What changes are included in this PR?
   
   Add slice versions of the ```MemoryManager``` interface methods:
   
   - ```CopyBufferSliceFrom```
   - ```CopyBufferSliceTo```
   - ```CopyNonOwnedSliceFrom```
   - ```CopyNonOwnedSliceTo```
   - ```ViewBufferSliceFrom```
   - ```ViewBufferSliceTo```
   
   As well as ```CPUMemoryManager``` overrides.
   
   Add ```static Result<std::shared_ptr<Buffer>> ViewOrCopySlice```
   
   Add ```static Result<std::shared_ptr<Buffer>> CopyBufferSlice``` & ```static 
Result<std::shared_ptr<Buffer>> ViewBufferSlice```
   
   -### Are these changes tested?
   
   todo


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