Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:26

0001 #ifndef HeterogenousCore_CUDAUtilities_currentDevice_h
0002 #define HeterogenousCore_CUDAUtilities_currentDevice_h
0003 
0004 #include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h"
0005 
0006 #include <cuda_runtime.h>
0007 
0008 namespace cms {
0009   namespace cuda {
0010     inline int currentDevice() {
0011       int dev;
0012       cudaCheck(cudaGetDevice(&dev));
0013       return dev;
0014     }
0015   }  // namespace cuda
0016 }  // namespace cms
0017 
0018 #endif