11inline uint64_t
Derive(uint64_t seed, uint64_t stream)
13 uint64_t value = seed + 0x9e3779b97f4a7c15ULL * (stream + 1);
14 value = (value ^ (value >> 30)) * 0xbf58476d1ce4e5b9ULL;
15 value = (value ^ (value >> 27)) * 0x94d049bb133111ebULL;
16 return value ^ (value >> 31);
21 std::random_device entropy;
22 static std::atomic<uint64_t> next{0};
23 const uint64_t random = (uint64_t(entropy()) << 32) ^ uint64_t(entropy());
24 return Derive(random, next.fetch_add(1, std::memory_order_relaxed));