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

Method CopyNonOwned

cpp/src/arrow/device.cc:89–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89Result<std::unique_ptr<Buffer>> MemoryManager::CopyNonOwned(
90 const Buffer& buf, const std::shared_ptr<MemoryManager>& to) {
91 const auto& from = buf.memory_manager();
92 auto maybe_buffer = to->CopyNonOwnedFrom(buf, from);
93 COPY_BUFFER_RETURN(maybe_buffer, to);
94 // `to` doesn't support copying from `from`, try the other way
95 maybe_buffer = from->CopyNonOwnedTo(buf, to);
96 COPY_BUFFER_RETURN(maybe_buffer, to);
97
98 return Status::NotImplemented("Copying buffer from ", from->device()->ToString(),
99 " to ", to->device()->ToString(), " not supported");
100}
101
102Result<std::shared_ptr<Buffer>> MemoryManager::ViewBuffer(
103 const std::shared_ptr<Buffer>& buf, const std::shared_ptr<MemoryManager>& to) {

Callers

nothing calls this directly

Calls 6

NotImplementedFunction · 0.70
memory_managerMethod · 0.45
CopyNonOwnedFromMethod · 0.45
CopyNonOwnedToMethod · 0.45
ToStringMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected