| 253 | } |
| 254 | |
| 255 | Result<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 | |
| 262 | Result<std::shared_ptr<CudaHostBuffer>> CudaDevice::AllocateHostBuffer(int64_t size) { |
| 263 | ARROW_ASSIGN_OR_RAISE(auto context, GetContext()); |