Fr4nz

Bit count in OpenCL

Discussion created by Fr4nz on Mar 11, 2010
Latest reply on Mar 15, 2010 by Fr4nz

Does it exist in OpenCL a fast way (a function or an extension to the standard) to count "1" bits present in a word (for ie, an unsigned int), without having to use loops, shifts and masks or fast techniques like precomputed lookup tables (which would require using a portion of constant memory...)?

If I'm not wrong, ATI videocards have an instruction that does this...I'm guessing if this is usable in OpenCL, given that there's noting written about this topic in the OpenCL specs.

Outcomes