huytd / opencl-benchmark

Sample program to compare calculation performance between CPU and GPU
16 stars 8 forks source link

Measuring seconds, not milliseconds #5

Open jmaha opened 3 years ago

jmaha commented 3 years ago

Your runtime calculation is actually measuring seconds: double runtime = (double)(end - begin) / CLOCKS_PER_SEC;

However, you're marking that calculation as milliseconds when you display it: printf("Runtime: %lfms\n", runtime);

Your project comes up when searching for "OpenCL test programs" so it would be nice to address those items for people who are new to OpenCL!