Boost logo

Boost Users :

Subject: Re: [Boost-users] thread-safe boost::random_device / boost:mt19937
From: Heiko Bauke (heiko.bauke_at_[hidden])
Date: 2012-12-20 16:38:48


Dear Philipp,

On Thu, 20 Dec 2012 17:26:41 +0100
Philipp Kraus <philipp.kraus_at_[hidden]> wrote:

> I'm using boost::random_device & boost::mt19937 for creating random
> numbers. I would like to use both within different threads, are both
> object thread-safe, so I can use it without any thread locking?

I am not sure if boost random number generators are thread save. In
doubt, you may consider to switch to TRNG, see
http://numbercrunch.de/trng/ .

        Heiko

-- 
-- Number Crunch Blog @ http://numbercrunch.de
--  Cluster Computing @ http://www.clustercomputing.de
--        Heiko Bauke @ http://www.mpi-hd.mpg.de/personalhomes/bauke

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net