title: Kernel pipeline and clEnqueueReadBuffer
body: <p>I have a pipeline of kernels:</p>
  
  <p>1) kernel A writes data into buffer X</p>
  
  <p>2) buffer X is copied to host via clEnqueueReadBuffer</p>
  
  <p>3) host data is processed, in callback triggered by clEnqueueReadBuffer</p>
  
  <p>repeat above</p>
  
  <p>Buffer X is created with the following flags : </p>
  
  <pre><code> CL_MEM_USE_HOST_PTR | CL_MEM_READ_WRITE; | CL_MEM_HOST_READ_ONLY
  </code></pre>
  
  <p>My question:  once clEnqueueReadBuffer is complete (I have an event triggered by CL_COMPLETE), is it safe for kernel A to run again without 
  overwriting data being processed on the host ?</p>
  
  <p>Or should I process the data on the host before I allow kernel A to run again?</p>
  
  <p>Because I am seeing a bug in my code indicating that it is not safe for kernel A to run until I process the data on the host.</p>
  
  <p>Thanks!</p>