title: CUDA: Finding the N largest values of a sparse array
body: <p>I have an array of a few million values stored on the global memory of the GPU. Most of them are zero, except for a few thousand. The values are the results of a computation on the device.</p>
  
  <p>I want to find, say, the <code>1024</code> largest values as well as their indices, as fast as possible.</p>
  
  <p>Does anyone have any suggestions?</p>