MCPcopy Create free account
hub / github.com/apache/arrow / GetBuffer

Function GetBuffer

cpp/src/arrow/array/data.h:629–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627 std::shared_ptr<Array> ToArray() const;
628
629 std::shared_ptr<Buffer> GetBuffer(int index) const {
630 const BufferSpan& buf = this->buffers[index];
631 if (buf.owner) {
632 return *buf.owner;
633 } else if (buf.data != NULLPTR) {
634 // Buffer points to some memory without an owning buffer
635 return std::make_shared<Buffer>(buf.data, buf.size);
636 } else {
637 return NULLPTR;
638 }
639 }
640
641 void SetSlice(int64_t offset, int64_t length) {
642 this->offset = offset;

Callers 6

LoadCommonMethod · 0.85
LoadPrimitiveMethod · 0.85
LoadBinaryMethod · 0.85
LoadListMethod · 0.85
LoadListViewMethod · 0.85
VisitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected