Random numbers have been well covered here, so I'll keep it brief.
I use srand
and rand
to generate some deterministic random numbers in a simulation. However, when running multiple simulations at once on separate threads, the individual sequence gets muddled up and becomes non deterministic, because all threads draw from the same pool. Is there an easy way to "bind" rand
to draw from a specific instance? Or would I have to switch to something like Boost.Random
?