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

Method ViewBufferFrom

cpp/src/arrow/buffer_test.cc:184–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184Result<std::shared_ptr<Buffer>> MyMemoryManager::ViewBufferFrom(
185 const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& from) {
186 if (!allow_view()) {
187 return nullptr;
188 }
189 if (from->is_cpu()) {
190 // CPU on MyDevice: wrap CPU buffer
191 return std::make_shared<MyBuffer>(shared_from_this(), buf);
192 }
193 return nullptr;
194}
195
196Result<std::shared_ptr<Buffer>> MyMemoryManager::ViewBufferTo(
197 const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& to) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected