| 1402 | return CopyNonOwnedFrom(*buf, from); |
| 1403 | } |
| 1404 | Result<std::unique_ptr<Buffer>> CopyNonOwnedFrom( |
| 1405 | const Buffer& buf, const std::shared_ptr<MemoryManager>& from) override { |
| 1406 | if (!from->is_cpu()) { |
| 1407 | return nullptr; |
| 1408 | } |
| 1409 | |
| 1410 | ARROW_ASSIGN_OR_RAISE(auto dest, AllocateBuffer(buf.size())); |
| 1411 | if (buf.size() > 0) { |
| 1412 | memcpy(dest->mutable_data(), buf.data(), static_cast<size_t>(buf.size())); |
| 1413 | } |
| 1414 | return dest; |
| 1415 | } |
| 1416 | }; |
| 1417 | |
| 1418 | std::shared_ptr<MemoryManager> MyDevice::default_memory_manager() { |
nothing calls this directly
no test coverage detected