title: How to get a list (or subset) from an OpenCL Kernel?
body: <p>I have a large array with 2^20 ulongs on it.  This little OpenCL kernel flows through it like a charm. Yet, I have absolutely no idea (and google hasn't helped here) how to return a small number of items (2^10) from it. </p>
  
  <p>What I'm looking for is a fixed-sized list with at most 1024 items that have hamming distance (popcount) smaller than a given number.  The list order doesn't matter, so perhaps I should be asking for a subset of these 2**20 items.</p>