| 1394 | return CopyNonOwnedFrom(*buf, from); |
| 1395 | } |
| 1396 | Result<std::unique_ptr<Buffer>> CopyNonOwnedFrom( |
| 1397 | const Buffer& buf, const std::shared_ptr<MemoryManager>& from) override { |
| 1398 | if (!from->is_cpu()) { |
| 1399 | return nullptr; |
| 1400 | } |
| 1401 | |
| 1402 | ARROW_ASSIGN_OR_RAISE(auto dest, AllocateBuffer(buf.size())); |
| 1403 | if (buf.size() > 0) { |
| 1404 | memcpy(dest->mutable_data(), buf.data(), static_cast<size_t>(buf.size())); |
| 1405 | } |
| 1406 | return dest; |
| 1407 | } |
| 1408 | }; |
| 1409 | |
| 1410 | std::shared_ptr<MemoryManager> MyDevice::default_memory_manager() { |
nothing calls this directly
no test coverage detected