15 #ifndef CORE_GPU_CUDA_TIMER_H_
16 #define CORE_GPU_CUDA_TIMER_H_
18 #if !defined(__ROOTCLING__) && !defined(G__DICTIONARY)
28 CudaTimer(std::string name) : name_(name) {
29 cudaEventCreate(&start_);
30 cudaEventCreate(&stop_);
31 cudaEventRecord(start_, 0);
35 cudaEventRecord(stop_, 0);
37 cudaEventSynchronize(stop_);
38 cudaEventElapsedTime(&duration, start_, stop_);
39 std::cout << name_ <<
" " << duration << std::endl;
40 cudaEventDestroy(start_);
41 cudaEventDestroy(stop_);
53 #endif // !__ROOTCLING__ && !G__DICTIONARY
54 #endif // CORE_GPU_CUDA_TIMER_H_