// Returns the next prng value. // pRNG is: aX+b mod c with a = 0x5DEECE66D, b = 0xB, c = 1<<48 // This is the lrand64 generator. inline uint64_t next(uint64_t rnd) { staticconst uint64_t PrngMult = 0x5DEECE66DLL; staticconst uint64_t PrngAdd = 0xB; staticconst uint64_t PrngModPower = 48; staticconst uint64_t PrngModMask = (static_cast<uint64_t>(1) << PrngModPower) - 1; return (PrngMult * rnd + PrngAdd) & PrngModMask;
}
inlinedouble JfrPRNG::next_uniform() const {
_rnd = next(_rnd); // Take the top 26 bits as the random number // (This plus a 1<<58 sampling bound gives a max possible step of // 5194297183973780480 bytes. In this case, // for sample_parameter = 1<<19, max possible step is // 9448372 bytes (24 bits). staticconst uint64_t PrngModPower = 48; // Number of bits in prng // The uint32_t cast is to prevent a (hard-to-reproduce) NAN // under piii debug for some binaries. // the n_rand value is between 0 and 2**26-1 so it needs to be normalized by dividing by 2**26 (67108864) return (static_cast<uint32_t>(_rnd >> (PrngModPower - 26)) / static_cast<double>(67108864));
}
#endif// SHARE_JFR_UTILITIES_JFRRANDOM_INLINE_HPP
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-09-09)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.