Cuda Thrust min_element crashes
<p>I have the following code snippet</p>

<pre><code>uint64_t myvec[] = {1,2,3,4,5};

int main(void)
{   
  uint64_t* dev;    
  cudaMalloc(&amp;dev, 5*sizeof(uint64_t));
  cudaMemcpy(dev,myvec,sizeof(uint64_t)*5,cudaMemcpyHostToDevice);  
  uint64_t* min_iter = thrust::min_element(thrust::device, dev, dev+5);

  return 0;
}
</code></pre>

<p>This code crashes with a segfault because of min_element on device.</p>

<p>But this code seems to be working if i perform it on host </p>

<pre><code>uint64_t* min_iter = thrust::min_element(thrust::host, myvec, myvec+5);
</code></pre>

<p>I don't know what's wrong. I am using cuda 7.5. Is this a bug?</p>