Time CPU

Hello All,

I am new to CUDA, so I am sure this is a simple newbie question but how does one go about timing an operation using CUDA GPU and CPU? I would like to use the “timer” functions offered in the example for Matrix-Multiplication:

unsigned int timer = 0;

// Start Timer …
// Do the CPU version of Matrix Multiplication:
// End Timer …

Do you do the same procedure as for the GPU Timing operation?

Thank you.

yes, I use cuda timer to measure both GPU code and CPU code.

Thank you, it works fine.