Forum Discussion
Altera_Forum
Honored Contributor
8 years agowhy did clFinish cause a shorter execution time for collaborative computing
Hi, :( So sorry... I am new and I do not know why I can not reply to @HRZ on this thread: https://alteraforum.com/forum/showthread.php?t=57651 So sorry I have to post a new thread here... ...
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.