title: Find all possible subsets of a short array in C
body: <p>I have a relatively short array in C (&lt;32 elements), and want to iterate over all possible subsets of that array of length >= 2. There are many ways of doing so by recursively building a list of all sublists, but I'd like to avoid the extra overhead this adds. All I need is to iterate over each subset; I don't need to keep track of them.</p>
  
  <p>This might sound like a strange requirement, but the reason is that I would also like to be able to use this in an OpenCL kernel where per-work-item memory is quite expensive. Allocating a list of lists is something I'd really like to avoid.</p>