37 #ifndef _PCL_CUDA_TIMERS_HPP_
38 #define _PCL_CUDA_TIMERS_HPP_
40 #include <cuda_runtime_api.h>
53 cudaEventCreate(&
stop_);
60 cudaEventDestroy(
stop_);
80 cudaEventCreate(&
start);
81 cudaEventCreate(&
stop);
82 cudaEventRecord(
start);
87 cudaEventRecord(
stop);
88 cudaEventSynchronize(
stop);
89 cudaEventElapsedTime(&elapsed_time,
start,
stop);
90 printf(
"Time(%s) = %fms\n",
name, elapsed_time);
91 cudaEventDestroy(
start);
92 cudaEventDestroy(
stop);
ScopeTimer(const char *name_)
Timer(bool runTimer=false)