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

Method GetSharedContext

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

Source from the content-addressed store, hash-verified

253}
254
255Result<std::shared_ptr<CudaContext>> CudaDevice::GetSharedContext(void* handle) {
256 auto context = std::shared_ptr<CudaContext>(new CudaContext());
257 auto self = checked_pointer_cast<CudaDevice>(shared_from_this());
258 RETURN_NOT_OK(context->impl_->InitShared(self, reinterpret_cast<CUcontext>(handle)));
259 return context;
260}
261
262Result<std::shared_ptr<CudaHostBuffer>> CudaDevice::AllocateHostBuffer(int64_t size) {
263 ARROW_ASSIGN_OR_RAISE(auto context, GetContext());

Callers 2

GetSharedContextMethod · 0.45
NonPrimaryContextMethod · 0.45

Calls 1

InitSharedMethod · 0.80

Tested by 1

NonPrimaryContextMethod · 0.36