Forum Discussion
Altera_Forum
Honored Contributor
8 years agoI am not familiar with threading using std::threads, so I cannot really comment on the correctness of your threading mechanism. The OpenCL part looks correct to me and time3-time2 should give you the kernel execution time. Though, you might want to move "clSetKernelArg()" outside of the timing region. Also you should probably make sure your kernel run time is long enough (at least a few seconds) so that the timing or kernel launch overhead does not dominate the measured run time.