title: How to initialise CUDA Thrust vector without implicitly invoking 'copy'?
body: <p>I have a pointer <code>int *h_a</code> which references a large number <code>N</code> of data points (on host) that I want to copy to device. So I do:</p>
  
  <pre><code>thrust::host_vector&lt;int&gt; ht_a(h_a, h_a + N);
  thrust::device_vector&lt;int&gt; dt_a = ht_a;
  </code></pre>
  
  <p>However, creating <code>ht_a</code> seems to implictly <em>copy</em> <code>h_a</code> rather than reference it, which is inefficient as I don't need another copy of <code>h_a</code>.</p>
  
  <p>I just want to create <code>ht_a</code> such that <code>&amp;ht_a[0]</code> points to <code>h_a[0]</code> - how to do this?</p>
  
  <p>Many thanks.</p>
  
  <p><em>Alternatively, as I'm not actually doing anything with <code>ht_a</code> other than copying to device memory, I'd be interested to know if we can go directly between <code>int*</code> and <code>thrust::device_vector&lt;int&gt;</code>.</em></p>