diff --git a/src/prng/xorshift/xorshift.c b/src/prng/xorshift/xorshift.c index b90dda7..bfff946 100644 --- a/src/prng/xorshift/xorshift.c +++ b/src/prng/xorshift/xorshift.c @@ -12,7 +12,7 @@ struct split_mix_64_state { internal u64 rol64(u64 x, u64 bits); internal u64 split_mix_64(SplitMix64State *state); -XOR256State wapp_init_xor_256_state(void) { +XOR256State wapp_prng_xorshift_init_state(void) { persistent bool seeded = false; if (!seeded) { seeded = true; @@ -33,7 +33,7 @@ XOR256State wapp_init_xor_256_state(void) { }; } -u64 wapp_xorshift_256_generate(XOR256State *state) { +u64 wapp_prng_xorshift_256(XOR256State *state) { u64 t = state->x ^ (state->x << 11); state->x = state->y; @@ -44,7 +44,7 @@ u64 wapp_xorshift_256_generate(XOR256State *state) { return state->w; } -u64 wapp_xoshiro_256ss_generate(XOR256State *state) { +u64 wapp_prng_xorshift_256ss(XOR256State *state) { const u64 result = rol64(state->z * 5, 7) * 9; const u64 t = state->z << 17; @@ -59,7 +59,7 @@ u64 wapp_xoshiro_256ss_generate(XOR256State *state) { return result; } -u64 wapp_xoshiro_256p_generate(XOR256State *state) { +u64 wapp_prng_xorshift_256p(XOR256State *state) { const u64 result = state->w + state->x; const u64 t = state->z << 17; diff --git a/src/prng/xorshift/xorshift.h b/src/prng/xorshift/xorshift.h index eb4bc4b..18f4a9a 100644 --- a/src/prng/xorshift/xorshift.h +++ b/src/prng/xorshift/xorshift.h @@ -15,10 +15,10 @@ struct xor_256_state { u64 w; }; -XOR256State wapp_init_xor_256_state(void); -u64 wapp_xorshift_256_generate(XOR256State *state); -u64 wapp_xoshiro_256ss_generate(XOR256State *state); -u64 wapp_xoshiro_256p_generate(XOR256State *state); +XOR256State wapp_prng_xorshift_init_state(void); +u64 wapp_prng_xorshift_256(XOR256State *state); +u64 wapp_prng_xorshift_256ss(XOR256State *state); +u64 wapp_prng_xorshift_256p(XOR256State *state); #ifdef __cplusplus END_C_LINKAGE