38 #ifndef PCL_CUDA_TIME_GPU_H_ 39 #define PCL_CUDA_TIME_GPU_H_ 42 #include <pcl/cuda/cutil_inline.h> 67 std::cerr << title_ <<
" took " << elapsed_time_ <<
"ms.\n";
74 CUT_CHECK_ERROR (
"dude");
75 cutilSafeCall (cudaEventCreate (&start_));
76 cutilSafeCall (cudaEventCreate (&end_));
78 cutilSafeCall (cudaEventRecord (start_, 0));
85 CUT_CHECK_ERROR (
"dude");
87 cutilSafeCall (cudaThreadSynchronize ());
88 cutilSafeCall (cudaEventRecord (end_, 0));
89 cutilSafeCall (cudaEventSynchronize (end_));
90 cutilSafeCall (cudaEventElapsedTime (&elapsed_time_, start_, end_));
92 cutilSafeCall (cudaEventDestroy (end_));
93 cutilSafeCall (cudaEventDestroy (start_));
100 std::cerr << title_ <<
" took " << elapsed_time_ <<
"ms.\n";
115 #endif //#ifndef PCL_CUDA_TIMER_H_ This file defines compatibility wrappers for low level I/O functions.
void start()
Start the timer.
void stop()
Stop the timer.
Class to measure the time spent in a scope.
void stop_print()
Stop and print the timer.
ScopeTimeGPU(const char *title)
Constructor.
~ScopeTimeGPU()
Destructor.