Download include/sk_random.h from Snapkitty/snapkitty-mlc: direct link, hf CLI and curl.
- Browser
- Download file 1.43 kB
-
https://huggingface.co/Snapkitty/snapkitty-mlc/resolve/main/include/sk_random.h
- Command line
-
hf download hf://Snapkitty/snapkitty-mlc/include/sk_random.h
-
curl -L -o sk_random.h https://huggingface.co/Snapkitty/snapkitty-mlc/resolve/main/include/sk_random.h
1.43 kB
| /* sk_random.h β SnapKitty MLC: PCG32 pseudo-random number generator | |
| * | |
| * Algorithm: PCG-XSH-RR (O'Neill 2014). Period 2^64. | |
| * Stateless reentrant API (_r suffix) + global convenience wrappers. | |
| * | |
| * Authors: Ahmad Ali Parr, Jessica L. Williams (SNAPKITTYWEST) | |
| * Source: SNAPKITTYAGENT9NOVA/MLC | |
| * License: BSL-1.1 / AGPL-3.0 / MPL-2.0 | |
| */ | |
| typedef struct { | |
| u64 state; | |
| u64 inc; | |
| } sk_prng; | |
| /* ββ Seeding ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| void sk_prng_seed_r(sk_prng* rng, u64 initstate, u64 initseq); | |
| void sk_prng_seed(u64 initstate, u64 initseq); | |
| /* ββ Generation βββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| u32 sk_prng_rand_r(sk_prng* rng); | |
| u32 sk_prng_rand(void); | |
| f32 sk_prng_randf_r(sk_prng* rng); /* [0, 1) */ | |
| f32 sk_prng_randf(void); /* [0, 1) */ | |
| /* Compatibility aliases */ | |