1

Bitwise XOR is often used for combining hashes or random number generators (https://math.stackexchange.com/a/340028/266666). This operator has a good property: if r1 and r2 are uniformly distributed randoms than r1 ^ r2 is uniformly distributed random too.

I know that XOR can be represented as a sum of row but it is would be expensive calculation involving loop. Considering that I want to implement random number generation on GPU.

So, my question is: "Is there any operators that which are able to combine two uniform random numbers, like bitwise XOR, but without bitwise functions?"

kelin
  • 121
  • Or may be I should use a lookup table for XOR... – kelin Jun 29 '16 at 14:29
  • recent (2008+) GPU should support bitwise XOR, see for example http://stackoverflow.com/q/1700871 – Claude Jun 29 '16 at 15:18
  • @Claude, iphone 5, for example, supports only OpenGL ES 2.0 where bitwise operations are not available. Also this question could be interesting theoretically. – kelin Jun 29 '16 at 15:38

0 Answers0