This module define functions that generate pseudorandom numbers usingalgorithms described in Parallel Random Numbers: As Easy as 1,2,3, byJohn K. Salmon, Mark A. Moraes, Ron O. Dror and David E.Shaw.
Two different algorithms are proposed : threefry and philox. Both should give high quality random number. Threefry is quicker on CPU, while philox is best used on GPU.
Both algorithms are counter based pseudorandom number generator, meaning that they need two parameters:
a key, each key will generate an unique sequence,
a counter, which will give the different numbers in the sequence.
nsimd::packx2<u32> philox_2x32_10(nsimd::packx2<u32> in, nsimd::packx1<u32> key)
;
Returns a random number using the philox generator
nsimd::packx4<u32> philox_4x32_7(nsimd::packx4<u32> in, nsimd::packx2<u32> key)
;
Returns a random number using the philox generator
nsimd::packx4<u32> philox_4x32_10(nsimd::packx4<u32> in, nsimd::packx2<u32> key)
;
Returns a random number using the philox generator
nsimd::packx2<u64> philox_2x64_6(nsimd::packx2<u64> in, nsimd::packx1<u64> key)
;
Returns a random number using the philox generator
nsimd::packx2<u64> philox_2x64_10(nsimd::packx2<u64> in, nsimd::packx1<u64> key)
;
Returns a random number using the philox generator
nsimd::packx4<u64> philox_4x64_7(nsimd::packx4<u64> in, nsimd::packx2<u64> key)
;
Returns a random number using the philox generator
nsimd::packx4<u64> philox_4x64_10(nsimd::packx4<u64> in, nsimd::packx2<u64> key)
;
Returns a random number using the philox generator
nsimd::packx2<u32> threefry_2x32_12 (nsimd::packx2<u32> in, nsimd::packx2<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx2<u32> threefry_2x32_20 (nsimd::packx2<u32> in, nsimd::packx2<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx2<u32> threefry_2x32_32 (nsimd::packx2<u32> in, nsimd::packx2<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u32> threefry_4x32_12 (nsimd::packx4<u32> in, nsimd::packx4<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u32> threefry_4x32_20 (nsimd::packx4<u32> in, nsimd::packx4<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u32> threefry_4x32_72 (nsimd::packx4<u32> in, nsimd::packx4<u32> key)
;
Returns a random number using the threefry generator
nsimd::packx2<u64> threefry_2x64_13 (nsimd::packx2<u64> in, nsimd::packx2<u64> key)
;
Returns a random number using the threefry generator
nsimd::packx2<u64> threefry_2x64_20 (nsimd::packx2<u64> in, nsimd::packx2<u64> key)
;
Returns a random number using the threefry generator
nsimd::packx2<u64> threefry_2x64_32 (nsimd::packx2<u64> in, nsimd::packx2<u64> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u64> threefry_4x64_12 (nsimd::packx4<u64> in, nsimd::packx4<u64> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u64> threefry_4x64_20 (nsimd::packx4<u64> in, nsimd::packx4<u64> key)
;
Returns a random number using the threefry generator
nsimd::packx4<u64> threefry_4x64_72 (nsimd::packx4<u64> in, nsimd::packx4<u64> key)
;
Returns a random number using the threefry generator