It's currently possible to initialize an RNG from a uint32_t value or from an array thereof. If I understand correctly, these seeds then get mixed somehow to fill up the internal state, and finally some invariants are enforced:
initial_mask(dsfmt);
period_certification(dsfmt);
dsfmt->idx = DSFMT_N64;
Sometimes you might already have another RNG ready, from which you would like to initialize a dSFMT RNG. With the current dSFMT API, you have to create an random array of uint32_t of some arbitrary length and pass it to dsfmt_init_by_array. But it's somewhat slow, and this is mixing an already random seed.
It would be great to be able to directly randomize the state, and be able to call the "invariants routines" (initial_mask and period_certification, which are currently marked static, and so are not callable from a shared library). Or better yet, have a new API function which does these three steps (quoted code above) at once.
I would be happy to provide a patch if this receives positive feedback.
It's currently possible to initialize an RNG from a
uint32_tvalue or from an array thereof. If I understand correctly, these seeds then get mixed somehow to fill up the internal state, and finally some invariants are enforced:Sometimes you might already have another RNG ready, from which you would like to initialize a dSFMT RNG. With the current dSFMT API, you have to create an random array of
uint32_tof some arbitrary length and pass it todsfmt_init_by_array. But it's somewhat slow, and this is mixing an already random seed.It would be great to be able to directly randomize the state, and be able to call the "invariants routines" (
initial_maskandperiod_certification, which are currently markedstatic, and so are not callable from a shared library). Or better yet, have a new API function which does these three steps (quoted code above) at once.I would be happy to provide a patch if this receives positive feedback.