MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / philoxRound

Function philoxRound

src/backend/cuda/kernel/random_engine_philox.hpp:71–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71static inline __device__ void philoxRound(const uint m0, const uint m1,
72 const uint k[2], uint c[4]) {
73 uint hi0, lo0, hi1, lo1;
74 mulhilo(m0, c[0], hi0, lo0);
75 mulhilo(m1, c[2], hi1, lo1);
76 c[0] = hi1 ^ c[1] ^ k[0];
77 c[1] = lo1;
78 c[2] = hi0 ^ c[3] ^ k[1];
79 c[3] = lo0;
80}
81
82static inline __device__ void philox(uint key[2], uint ctr[4]) {
83 // 10 Rounds

Callers 1

philoxFunction · 0.70

Calls 1

mulhiloFunction · 0.70

Tested by

no test coverage detected