title: 2d char array to CUDA kernel
body: <p>I need help with transfer char[][] to Cuda kernel. This is my code:</p>
  
  <pre><code>__global__ 
  void kernel(char** BiExponent){
    for(int i=0; i&lt;500; i++)
       printf("%c",BiExponent[1][i]); // I want print line 1
  }
  
  int main(){
    char (*Bi2dChar)[500] = new char [5000][500];
    char **dev_Bi2dChar;
  
    ...//HERE I INPUT DATA TO Bi2dChar
  
    size_t host_orig_pitch = 500 * sizeof(char);
    size_t pitch;
    cudaMallocPitch((void**)&amp;dev_Bi2dChar, &amp;pitch, 500 * sizeof(char), 5000);
    cudaMemcpy2D(dev_Bi2dChar, pitch, Bi2dChar, host_orig_pitch, 500 * sizeof(char), 5000, cudaMemcpyHostToDevice);
    kernel &lt;&lt;&lt; 1, 512 &gt;&gt;&gt; (dev_Bi2dChar);
    free(Bi2dChar); cudaFree(dev_Bi2dChar);
  }
  </code></pre>
  
  <p>I use:
  nvcc.exe" -gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env --cl-version 2012 -ccbin</p>
  
  <p>Thanks for help.</p>