Reputation: 584
I've encountered this problem. I need to compare CPU and GPU performance when calculating fractal using WebCL, CUDA or OpenCL. How can I do this?
Thank you.
Upvotes: -3
Views: 428
Reputation: 283614
You can either time how long it takes to run a fixed number of iterations, or measure how many iterations are completed in a fixed time.
Or you can do something fancier such as doing a fixed amount of work, but if it completes too quickly such that timing imprecision is too large relatively, increase the work by a factor and repeat.
In any case, you can then calculate throughput as:
work_done / time_needed
Upvotes: 1