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

Function GetBuffer

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

Source from the content-addressed store, hash-verified

666 std::shared_ptr<Array> ToArray() const;
667
668 std::shared_ptr<Buffer> GetBuffer(int index) const {
669 const BufferSpan& buf = this->buffers[index];
670 if (buf.owner) {
671 return *buf.owner;
672 } else if (buf.data != NULLPTR) {
673 // Buffer points to some memory without an owning buffer
674 return std::make_shared<Buffer>(buf.data, buf.size);
675 } else {
676 return NULLPTR;
677 }
678 }
679
680 void SetSlice(int64_t offset, int64_t length) {
681 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