title: Get unique elements of multiple arrays in CUDA
body: <p>Here is the problem:
  There number of arrays, for example, 2000 arrays, but only 256 integers in each array. And the range of the integers is quite considerable, [0, 1000000] for instance.</p>
  
  <p>I want to get the unique elements for each array, in other words, remove the duplicate elements.
  I have 2 solutions:</p>
  
  <ol>
  <li><p>Use Thrust to get the unique element for every array, so I have to do 2000  times <code>thrust::unique</code>. But each array is pretty small, this way may not get a good performance.</p></li>
  <li><p>Implement hash table in cuda kernel, use 2000 blocks, 256 thread in each block. And make use of the shared memory to implement to hash table, then every single block will produce a element-unique array.</p></li>
  </ol>
  
  <p>The above two methods seem unprofessional, are there elegant ways to solve the problem by CUDA ?</p>