summaryrefslogtreecommitdiff
path: root/source/kit/mersenne_twister_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/kit/mersenne_twister_64.c')
-rw-r--r--source/kit/mersenne_twister_64.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/kit/mersenne_twister_64.c b/source/kit/mersenne_twister_64.c
index c40806e..9bf238f 100644
--- a/source/kit/mersenne_twister_64.c
+++ b/source/kit/mersenne_twister_64.c
@@ -5,9 +5,8 @@
#define UM 0xffffffff80000000ull
#define LM 0x7fffffffull
-void kit_mt64_init_array(kit_mt64_state_t *const state,
- ptrdiff_t const size,
- uint64_t const *const seed) {
+void kit_mt64_init_array(kit_mt64_state_t *state, ptrdiff_t size,
+ uint64_t *seed) {
ptrdiff_t i;
for (i = 0; i < size && i < KIT_MT64_N; i++) state->mt[i] = seed[i];
for (state->index = size; state->index < KIT_MT64_N; state->index++)
@@ -18,13 +17,12 @@ void kit_mt64_init_array(kit_mt64_state_t *const state,
state->index);
}
-void kit_mt64_init(kit_mt64_state_t *const state,
- uint64_t const seed) {
+void kit_mt64_init(kit_mt64_state_t *state, uint64_t seed) {
kit_mt64_init_array(state, 1, &seed);
}
-void kit_mt64_rotate(kit_mt64_state_t *const state) {
- static uint64_t const mag01[2] = { 0ull, MATRIX_A };
+void kit_mt64_rotate(kit_mt64_state_t *state) {
+ static uint64_t mag01[2] = { 0ull, MATRIX_A };
uint64_t x;
int i;
@@ -48,7 +46,7 @@ void kit_mt64_rotate(kit_mt64_state_t *const state) {
state->index = 0;
}
-uint64_t kit_mt64_generate(kit_mt64_state_t *const state) {
+uint64_t kit_mt64_generate(kit_mt64_state_t *state) {
if (state->index >= KIT_MT64_N)
kit_mt64_rotate(state);