QMCPACK
CUDAruntime.cpp File Reference
+ Include dependency graph for CUDAruntime.cpp:

Go to the source code of this file.

Functions

size_t getCUDAdeviceFreeMem ()
 

Function Documentation

◆ getCUDAdeviceFreeMem()

size_t getCUDAdeviceFreeMem ( )

Definition at line 15 of file CUDAruntime.cpp.

References cudaErrorCheck, and cudaMemGetInfo.

Referenced by qmcplusplus::print_mem().

16 {
17  size_t free, total;
18  cudaErrorCheck(cudaMemGetInfo(&free, &total), "cudaMemGetInfo failed!");
19  return free;
20 }
#define cudaErrorCheck(ans, cause)
Definition: CUDAerror.h:21
#define cudaMemGetInfo
Definition: cuda2hip.h:145