| 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; |
no outgoing calls
no test coverage detected