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

Function philoxRound

src/backend/oneapi/kernel/random_engine_philox.hpp:73–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

philoxFunction · 0.70

Calls 1

mulhiloFunction · 0.70

Tested by

no test coverage detected