title: CUDA gpu vector
body: <p>Recently, when I try to use CUDA programming, I want send a vector to GPU memory. Someone tells me that I can use thrust::device_vector and thrust::host_vector. I also read the help document, but still don't know how to send such a vector into the kernel function. 
  My codes are as following:</p>
  
  <pre><code>thrust::device_vector&lt;int&gt; dev_firetime[1000];
  
  __global__ void computeCurrent(thrust::device_vector&lt;int&gt; d_ftime)
  {
      int idx = blockDim.x*blockIdx.x + threadIdx.x;
      printf("ftime = %d\n", d_ftime[idx]);   
  }
  </code></pre>
  
  <p>In fact, I don't know how to send the vector to kernel function. If you know, please tell me something about this question, and are there any better way to complete the same function?
  Thanks very much!</p>