| 646 | CudaContext::~CudaContext() {} |
| 647 | |
| 648 | Result<std::unique_ptr<CudaBuffer>> CudaContext::Allocate(int64_t nbytes) { |
| 649 | uint8_t* data = nullptr; |
| 650 | RETURN_NOT_OK(impl_->Allocate(nbytes, &data)); |
| 651 | return std::make_unique<CudaBuffer>(data, nbytes, this->shared_from_this(), true); |
| 652 | } |
| 653 | |
| 654 | Result<std::shared_ptr<CudaBuffer>> CudaContext::View(uint8_t* data, int64_t nbytes) { |
| 655 | return std::make_shared<CudaBuffer>(data, nbytes, this->shared_from_this(), false); |
no outgoing calls
no test coverage detected