
2 May
2014
2 May
'14
12:32 p.m.
Thijs van den Berg wrote:
In that case it’s best to use a random engine adaptor.
counter_based_engine< Threefry<2,unsigned> > eng; uniform_real_distribution<float> zero_one(0., 1.);
eng.seed(thread_id);
for(int i=0; i
The adaptor needs to be in the loop; you don't have a thread_id outside it.
uniform_real_distribution<float> zero_one(0., 1.);
#pragma omp parallel for
for( int i=0; i