41 #include <pcl/cuda/cutil_inline.h>
66 std::cerr << title_ <<
" took " << elapsed_time_ <<
"ms.\n";
73 CUT_CHECK_ERROR (
"dude");
74 cutilSafeCall (cudaEventCreate (&start_));
75 cutilSafeCall (cudaEventCreate (&end_));
77 cutilSafeCall (cudaEventRecord (start_, 0));
84 CUT_CHECK_ERROR (
"dude");
86 cutilSafeCall (cudaDeviceSynchronize ());
87 cutilSafeCall (cudaEventRecord (end_, 0));
88 cutilSafeCall (cudaEventSynchronize (end_));
89 cutilSafeCall (cudaEventElapsedTime (&elapsed_time_, start_, end_));
91 cutilSafeCall (cudaEventDestroy (end_));
92 cutilSafeCall (cudaEventDestroy (start_));
99 std::cerr << title_ <<
" took " << elapsed_time_ <<
"ms.\n";
Class to measure the time spent in a scope.
void start()
Start the timer.
ScopeTimeGPU(const char *title)
Constructor.
~ScopeTimeGPU()
Destructor.
void stop()
Stop the timer.
void stop_print()
Stop and print the timer.