This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
where are the implementations for <random>?
- From: Oliver Kullmann <o dot kullmann at swansea dot ac dot uk>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Sun, 9 Apr 2017 18:31:01 +0100
- Subject: where are the implementations for <random>?
- Authentication-results: sourceware.org; auth=none
Hello,
I thought that with the facilities from <random> we had good and
well-defined ones -- but alas, only recently I realised that only say
the Mersenne twister is well-defined in the standard, but roughly
everything else is up to the implementer.
Since reproducibility is crucial for us (as with most scientific
applications), thus we need to implement ourselves the algorithms for
1. std::seed_seq
2. std::uniform_int_distribution
3. std::bernoulli_distribution (only for default p=0.5).
Easiest would be to copy (and specialise) the gcc-implementations.
I searched for it in the source-code, but couldn't find it:
Where do I find the implementations for <random> ?
Thanks for your help!
Oliver