Skip to content

Commit 957a0e6

Browse files
committed
ARROW-717: [C++] Implement IPC zero-copy round trip for tensors
This patch provides: ```python WriteTensor(tensor, file, &metadata_length, &body_length)); std::shared_ptr<Tensor> result; ReadTensor(offset, file, &result)); ``` Also implemented `Tensor::Equals` and did some refactoring / code simplification in compare.cc Author: Wes McKinney <wes.mckinney@twosigma.com> Closes #454 from wesm/ARROW-717 and squashes the following commits: 6c15481 [Wes McKinney] Tensor IPC read/write, and refactoring / code scrubbing
1 parent 15b874e commit 957a0e6

File tree

16 files changed

+656
-434
lines changed

16 files changed

+656
-434
lines changed

cpp/src/arrow/buffer.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727

2828
namespace arrow {
2929

30-
Buffer::Buffer(const std::shared_ptr<Buffer>& parent, int64_t offset, int64_t size) {
31-
data_ = parent->data() + offset;
32-
size_ = size;
30+
Buffer::Buffer(const std::shared_ptr<Buffer>& parent, int64_t offset, int64_t size)
31+
: Buffer(parent->data() + offset, size) {
3332
parent_ = parent;
34-
capacity_ = size;
3533
}
3634

3735
Buffer::~Buffer() {}

0 commit comments

Comments
 (0)