Mercurial
comparison third_party/luajit/src/lj_prng.h @ 178:94705b5986b3
[ThirdParty] Added WRK and luajit for load testing.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Thu, 22 Jan 2026 20:10:30 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 177:24fe8ff94056 | 178:94705b5986b3 |
|---|---|
| 1 /* | |
| 2 ** Pseudo-random number generation. | |
| 3 ** Copyright (C) 2005-2023 Mike Pall. See Copyright Notice in luajit.h | |
| 4 */ | |
| 5 | |
| 6 #ifndef _LJ_PRNG_H | |
| 7 #define _LJ_PRNG_H | |
| 8 | |
| 9 #include "lj_def.h" | |
| 10 | |
| 11 LJ_FUNC int LJ_FASTCALL lj_prng_seed_secure(PRNGState *rs); | |
| 12 LJ_FUNC uint64_t LJ_FASTCALL lj_prng_u64(PRNGState *rs); | |
| 13 LJ_FUNC uint64_t LJ_FASTCALL lj_prng_u64d(PRNGState *rs); | |
| 14 | |
| 15 /* This is just the precomputed result of lib_math.c:random_seed(rs, 0.0). */ | |
| 16 static LJ_AINLINE void lj_prng_seed_fixed(PRNGState *rs) | |
| 17 { | |
| 18 rs->u[0] = U64x(a0d27757,0a345b8c); | |
| 19 rs->u[1] = U64x(764a296c,5d4aa64f); | |
| 20 rs->u[2] = U64x(51220704,070adeaa); | |
| 21 rs->u[3] = U64x(2a2717b5,a7b7b927); | |
| 22 } | |
| 23 | |
| 24 #endif |