Forum Discussion
Altera_Forum
Honored Contributor
8 years agoThis should not matter since if both commands are launched in the same queue, they WILL be run sequentially and the clEnqueueWriteBuffer will start and finish BEFORE the kernel is launched. Furthermore, passing CL_TRUE as the third argument of "clEnqueueWriteBuffer" forces the write operation to be blocking, and the host process will be locked until the host to device transfer is done. The only way the kernel might be launched before clEnqueueWriteBuffer finishes is if the two commands are launched in different queues.