| 88 | } |
| 89 | |
| 90 | Status InitShared(const std::shared_ptr<CudaDevice>& device, CUcontext ctx) { |
| 91 | mm_ = checked_pointer_cast<CudaMemoryManager>(device->default_memory_manager()); |
| 92 | props_ = &device->impl_->props; |
| 93 | own_context_ = false; |
| 94 | context_ = ctx; |
| 95 | is_open_ = true; |
| 96 | return Status::OK(); |
| 97 | } |
| 98 | |
| 99 | Status Close() { |
| 100 | if (is_open_ && own_context_) { |
no test coverage detected