Skip to content

Commit 8293e79

Browse files
committed
Update function name to CopyBufferSliceToCPU
1 parent 7232f35 commit 8293e79

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

cpp/src/arrow/c/bridge.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ struct ArrayImporter {
18731873
int64_t last_offset_value_offset =
18741874
(c_struct_->length + c_struct_->offset) * sizeof(OffsetType);
18751875
OffsetType last_offset_value;
1876-
RETURN_NOT_OK(MemoryManager::CopyBufferSlice(
1876+
RETURN_NOT_OK(MemoryManager::CopyBufferSliceToCPU(
18771877
data_->buffers[offsets_buffer_id], last_offset_value_offset, sizeof(OffsetType),
18781878
reinterpret_cast<uint8_t*>(&last_offset_value)));
18791879
// Compute visible size of buffer

cpp/src/arrow/device.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ Result<std::shared_ptr<Buffer>> MemoryManager::ViewBuffer(
116116
" on ", to->device()->ToString(), " not supported");
117117
}
118118

119-
Status MemoryManager::CopyBufferSlice(const std::shared_ptr<Buffer>& buf, int64_t offset,
120-
int64_t length, uint8_t* out_data) {
119+
Status MemoryManager::CopyBufferSliceToCPU(const std::shared_ptr<Buffer>& buf,
120+
int64_t offset, int64_t length,
121+
uint8_t* out_data) {
121122
if (ARROW_PREDICT_TRUE(buf->is_cpu())) {
122123
memcpy(out_data, buf->data() + offset, static_cast<size_t>(length));
123124
return Status::OK();

cpp/src/arrow/device.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ class ARROW_EXPORT MemoryManager : public std::enable_shared_from_this<MemoryMan
250250
const std::shared_ptr<Buffer>& source, const std::shared_ptr<MemoryManager>& to);
251251

252252
/// \brief Copy a slice of a buffer into a CPU pointer
253-
static Status CopyBufferSlice(const std::shared_ptr<Buffer>& buf, int64_t offset,
254-
int64_t length, uint8_t* out_data);
253+
static Status CopyBufferSliceToCPU(const std::shared_ptr<Buffer>& buf, int64_t offset,
254+
int64_t length, uint8_t* out_data);
255255

256256
/// \brief Create a new SyncEvent.
257257
///

0 commit comments

Comments
 (0)