title: CUDA device pointer manipulation
body: <p>I've used:</p>
  
  <pre><code>float *devptr;
  //...
  cudaMalloc(&amp;devptr, sizeofarray);
  cudaMemcpy(devptr, hostptr, sizeofarray, cudaMemcpyHostToDevice);
  </code></pre>
  
  <p>in CUDA C to allocate and populate an array.
  Now I'm trying to run a cuda kernel, e.g.:</p>
  
  <pre><code>__global__ void kernelname(float *ptr)
  {
     //...
  }
  </code></pre>
  
  <p>in that array but with an offset value.
  In C/C++ it would be someting like this:</p>
  
  <pre><code>kernelname&lt;&lt;&lt;dimGrid, dimBlock&gt;&gt;&gt;(devptr+offset);
  </code></pre>
  
  <p>However, this doesn't seem to work. </p>
  
  <p>Is there a way to do this without sending the offset value to the kernel in a separate argument and use that offset in the kernel code?
  Any ideas on how to do this?</p>