| 486 | } |
| 487 | |
| 488 | Result<std::shared_ptr<Buffer>> CudaMemoryManager::ViewBufferTo( |
| 489 | const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& to) { |
| 490 | if (to->is_cpu()) { |
| 491 | // Device-on-CPU view |
| 492 | ARROW_ASSIGN_OR_RAISE(auto address, GetHostAddress(buf->address())); |
| 493 | return std::make_shared<Buffer>(address, buf->size(), to, buf, |
| 494 | DeviceAllocationType::kCUDA_HOST); |
| 495 | } |
| 496 | return nullptr; |
| 497 | } |
| 498 | |
| 499 | Result<std::shared_ptr<Buffer>> CudaMemoryManager::ViewBufferFrom( |
| 500 | const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& from) { |