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

Function gpu_getTotalMemoryInBytes

quest/src/gpu/gpu_config.cpp:277–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277size_t gpu_getTotalMemoryInBytes() {
278#if COMPILE_CUDA
279 assert_gpuHasBeenBound(hasGpuBeenBound);
280
281 size_t free, total;
282 CUDA_CHECK( cudaMemGetInfo(&free, &total) );
283 return total;
284
285#else
286 error_gpuQueriedButGpuNotCompiled();
287 return 0;
288#endif
289}
290
291
292bool gpu_doesGpuSupportMemPools() {

Callers 1

printGpuInfoFunction · 0.85

Calls 2

assert_gpuHasBeenBoundFunction · 0.85

Tested by

no test coverage detected