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