20 Apr
2014
20 Apr
'14
4:23 p.m.
On Sun, Apr 20, 2014 at 11:18 AM, Mathias Gaunard < mathias.gaunard@ens-lyon.org> wrote:
On 18/04/14 10:00, Thijs van den Berg wrote:
Do not use reinterpret_cast in operator(). The behavior is undefined, and will certainly differ depending on endianness.
I did this for speed and I didn’t worry about endianness because it never crossed my mind. Changing the order of bits/bytes should not affect the quality of the randomness, but it’s indeed not nice to have different behaviour on different machines. I’ll fix this.
Personally I would want this engine to produce exactly the same results as the reference random123 implementation for a given seed.
+1
This should be the case regardless of the platform used.
+1 --Beman