title: Bind texture with pinned mapped memory in CUDA
body: <p>I was trying to bind a host memory that was mapped for zero-copy to a texture, but it looks like it isn't possible.</p>
  
  <p>Here is a code sample:</p>
  
  <pre><code>float* a;
  float* d_a;
  cudaSetDeviceFlags(cudaDeviceMapHost);
  cudaHostAlloc( (void **)&amp;a, bytes, cudaHostAllocMapped);
  cudaHostGetDevicePointer((void **)&amp;d_a,  (void *)a, 0);
  
  texture&lt;float, 2, cudaReadModeElementType&gt; tex;
  cudaBindTexture2D( 0, &amp;tex, d_a, &amp;channelDesc, width, height, pitch);
  </code></pre>
  
  <p>Is it recommended that you used pinned memory and just copy it over to device memory that is bind to texture? </p>