| 708 | |
| 709 | |
| 710 | void gpu_clearCache() { |
| 711 | #if COMPILE_CUDA |
| 712 | |
| 713 | // do not interfere with existing kernels using the cache |
| 714 | gpu_sync(); |
| 715 | |
| 716 | // cudaFree on nullptr is fine |
| 717 | CUDA_CHECK( cudaFree(gpuCache) ); |
| 718 | |
| 719 | gpuCache = nullptr; |
| 720 | gpuCacheLen = 0; |
| 721 | |
| 722 | #else |
| 723 | error_gpuCacheModifiedButGpuNotCompiled(); |
| 724 | #endif |
| 725 | } |
| 726 | |
| 727 | |
| 728 | size_t gpu_getCacheMemoryInBytes() { |
no test coverage detected