title: std::vector to array in CUDA
body: <p>Is there a way to convert a 2D vector into an array to be able to use it in CUDA kernels?</p>
  
  <p>It is declared as:</p>
  
  <pre><code>vector&lt;vector&lt;int&gt;&gt; information;
  </code></pre>
  
  <p>I want to cudaMalloc and copy from host to device, what would be the best way to do it?</p>
  
  <pre><code>int *d_information;
  cudaMalloc((void**)&amp;d_information, sizeof(int)*size);
  cudaMemcpy(d_information, information, sizeof(int)*size, cudaMemcpyHostToDevice);
  </code></pre>