title: Is it possible to use thrust::device_vector and thrust::fill for 2D arrays using thrust library in CUDA
body: <p>I am new to use thrust library. I have my CUDA C code which uses global 2D arrays. I am initializing it using kernel function in my code. </p>
  
  <p>I have to know whether is it possible to use <code>thrust::device_vector</code> or <code>thrust::fill</code> to initialize and fill 2D arrays.</p>
  
  <p>For example: </p>
  
  <pre><code>// initialize 1D array with ten numbers in a device_vector 
      thrust::device_vector&lt;int&gt; D(10);
  </code></pre>
  
  <p>Is it possible to give..</p>
  
  <pre><code>thrust::device_vector&lt;int&gt; D[5][10];
  </code></pre>
  
  <p>and if its possible how will I use <code>thrust::fill</code> function.</p>
  
  <p>My aim is to optimize the code using thrust library.</p>