MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / gpu_clearCache

Function gpu_clearCache

quest/src/gpu/gpu_config.cpp:710–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

708
709
710void 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
728size_t gpu_getCacheMemoryInBytes() {

Callers 2

finalizeQuESTEnvFunction · 0.85
clearGpuCacheFunction · 0.85

Calls 2

gpu_syncFunction · 0.85

Tested by

no test coverage detected