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

Method CopyFromAnotherDevice

cpp/src/arrow/gpu/cuda_memory.cc:183–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183Status CudaBuffer::CopyFromAnotherDevice(const std::shared_ptr<CudaContext>& src_ctx,
184 const int64_t position, const void* data,
185 int64_t nbytes) {
186 if (nbytes > size_ - position) {
187 return Status::Invalid("Copy would overflow buffer");
188 }
189 return src_ctx->CopyDeviceToAnotherDevice(
190 context_, const_cast<uint8_t*>(data_) + position, data, nbytes);
191}
192
193Result<std::shared_ptr<CudaIpcMemHandle>> CudaBuffer::ExportForIpc() {
194 if (is_ipc_) {

Callers

nothing calls this directly

Calls 2

InvalidFunction · 0.50

Tested by

no test coverage detected