MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / RandomUInt

Function RandomUInt

test/fuzzers/random_generator.cpp:32–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30/// @returns i, where lower <= i < upper
31template <typename I>
32I RandomUInt(std::mt19937_64* engine, I lower, I upper) {
33 assert(lower < upper && "|lower| must be stictly less than |upper|");
34 return std::uniform_int_distribution<I>(lower, upper - 1)(*engine);
35}
36
37/// Helper for obtaining a seed bias value for HashCombine with a bit-width
38/// dependent on the size of size_t.

Callers 2

GetTargetEnvMethod · 0.85
GetUInt32Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected