title: Java OpenCL with JOCL: What is a direct buffer?
body: <p>When I was experimenting on clEnqueueReadBuffer, I got an exception:</p>
  
  <p>Exception in thread "main" java.lang.IllegalArgumentException: Non-blocking read operations may only be performed using pointers to direct buffers</p>
  
  <p>On this line:</p>
  
  <pre><code>    ec.add(clEnqueueReadBuffer(commandQueue, zCacheMem, false, 0, Sizeof.cl_int*numWords, zCachePtr, 0 , null, readEvents[0]));
  </code></pre>
  
  <p>Where zCacheMem is cl_mem, zCachePtr is pointing to a int[]</p>
  
  <p>I cannot find any documentation which explains this error. Can someone help?</p>