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

Method ViewBufferTo

cpp/src/arrow/gpu/cuda_context.cc:488–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

486}
487
488Result<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
499Result<std::shared_ptr<Buffer>> CudaMemoryManager::ViewBufferFrom(
500 const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& from) {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected