MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / philox_round

Function philox_round

src/framework/sampling/torch_random.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 lo = static_cast<uint32_t>(product);
37 hi = static_cast<uint32_t>(product >> 32U);
38}
39
40Philox4 philox_round(Philox4 counter, uint32_t key0, uint32_t key1) {
41 uint32_t hi0 = 0;
42 uint32_t lo0 = 0;
43 uint32_t hi1 = 0;
44 uint32_t lo1 = 0;
45 mul_hi_lo(kPhiloxM0, counter.x, hi0, lo0);
46 mul_hi_lo(kPhiloxM1, counter.z, hi1, lo1);
47 return Philox4{
48 hi1 ^ counter.y ^ key0,
49 lo1,
50 hi0 ^ counter.w ^ key1,
51 lo0,
52 };
53}
54

Callers 1

philox_4x32_10Function · 0.85

Calls 1

mul_hi_loFunction · 0.85

Tested by

no test coverage detected