title: Is there device side pointer of host memory for kernel use in OpenCL (like CUDA)?
body: <p>In CUDA, we can achieve kernel managed data transfer from host memory to device shared memory by device side pointer of host memory. Like this:</p>
  
  <pre><code>int  *a,*b,*c;          // host pointers
  int *dev_a, *dev_b, *dev_c;     // device pointers to host memory
  
      …       
  
  cudaHostGetDevicePointer(&amp;dev_a, a, 0); // mem. copy to device not need now, but ptrs needed instead
  cudaHostGetDevicePointer(&amp;dev_b, b, 0);
  cudaHostGetDevicePointer(&amp;dev_c ,c, 0);
  
      …   
  
  //kernel launch
  add&lt;&lt;&lt;B,T&gt;&gt;&gt;(dev_a,dev_b,dev_c); 
  // dev_a, dev_b, dev_c are passed into kernel for kernel accessing host memory directly.
  </code></pre>
  
  <p>In the above example, kernel code can access host memory via <code>dev_a</code>, <code>dev_b</code> and <code>dev_c</code>. Kernel can utilize these pointers to move data from host to shared memory directly without relaying them by global memory.</p>
  
  <p>But seems that it is an mission impossible in OpenCL? (local memory in OpenCL is the counterpart of shared memory in CUDA)</p>