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

Method ViewBufferTo

cpp/src/arrow/buffer_test.cc:196–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196Result<std::shared_ptr<Buffer>> MyMemoryManager::ViewBufferTo(
197 const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& to) {
198 if (!allow_view()) {
199 return nullptr;
200 }
201 if (to->is_cpu() && buf->parent()) {
202 // MyDevice on CPU: unwrap buffer
203 return buf->parent();
204 }
205 return nullptr;
206}
207
208// Like AssertBufferEqual, but doesn't call Buffer::data()
209void AssertMyBufferEqual(const Buffer& buffer, std::string_view expected) {

Callers

nothing calls this directly

Calls 1

parentMethod · 0.45

Tested by

no test coverage detected