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

Method ExportIpcBuffer

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

Source from the content-addressed store, hash-verified

160 }
161
162 Result<std::shared_ptr<CudaIpcMemHandle>> ExportIpcBuffer(const void* data,
163 int64_t size) {
164 CUipcMemHandle cu_handle;
165 if (size > 0) {
166 ContextSaver set_temporary(context_);
167 CU_RETURN_NOT_OK(
168 "cuIpcGetMemHandle",
169 cuIpcGetMemHandle(&cu_handle, reinterpret_cast<CUdeviceptr>(data)));
170 }
171 return std::shared_ptr<CudaIpcMemHandle>(new CudaIpcMemHandle(size, &cu_handle));
172 }
173
174 Status OpenIpcBuffer(const CudaIpcMemHandle& ipc_handle, uint8_t** out) {
175 int64_t size = ipc_handle.memory_size();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected