Code to calculate the time of execution of the program cuda time of execution of the program cuda

hello,

i have two programs one in C and the seconde in CUDA

and i would compare the time of execution of both programs

so i need function who calculate the time of execution of the program cuda

If you want to time the whole executable, just use “time ” on the command line. If you want finer profilers within it… you can use gettimeofday() (this is what cutil ultimately does).

If you want to time the whole executable, just use “time ” on the command line. If you want finer profilers within it… you can use gettimeofday() (this is what cutil ultimately does).

I would use CUDA events to measure the execution time of different parts of my programs. They are more accurate than gettimeofday(). This also works if the code is executed by CPU.

I would use CUDA events to measure the execution time of different parts of my programs. They are more accurate than gettimeofday(). This also works if the code is executed by CPU.