| 95 | } |
| 96 | |
| 97 | void CnMemPool::Free(void *ptr) { |
| 98 | CHECK(initialized_) |
| 99 | << "Cannot free the memory as the pool is not initialzied"; |
| 100 | cnmemStatus_t status = cnmemFree(ptr, NULL); |
| 101 | CHECK_EQ(status, cnmemStatus_t::CNMEM_STATUS_SUCCESS) |
| 102 | << " " << cnmemGetErrorString(status); |
| 103 | } |
| 104 | |
| 105 | // =========================================================================== |
| 106 | void CudaMemPool::Malloc(void **ptr, const size_t size) { |