corresponding method of clFinish() in kernel file

Discussion created by lava555 on Jun 25, 2010
Latest reply on Jul 24, 2010 by Lev

I'm now using two kernel functions to solve a problem, and two methods of invoking them have been used. In the first method, a kernel function is called by the other kernel function; and the two kernel functions are invoked on the host in-order in the second method. 

I used mem_fence() method in the first method and clFinish() in the second method. However, when i debug the program using the first method, something seemed wrong. So my question is: Is there something wrong of the first method, or the method in the kernel corresponding to clFinish() is not mem_fence() function? I also used barrier() function in both of the method.