title: CUDA invalid device function
body: <p>I get an <code>thrust::system::system_error invalid device function</code> while trying to access a device vector with <code>thrust::device_vector&lt; int &gt; labels_d(width*height);</code></p>
  
  <p>In my CMakeFile I've written 
  <code>SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-gencode arch=compute_20,code=compute_20)</code> 
  And also tried different settings there. 
  So I guess it has something to do with my GPU (a Quadro FX 580) and CUDA maybe a pointer to my device is wrong or something... </p>
  
  <p>Does anybody have a clue on what to change to make it work?</p>