src/QMCDrivers/QMCDriverNew.cpp
/** Creates Random Number generators for crowds and step contexts
 *
 *  This is quite dangerous in that number of crowds can be > omp_get_max_threads()
 *  This is used instead of actually passing number of threads/crowds
 *  controlling threads all over RandomNumberControl.
 */
Creates Random Number generators for crowds and step contexts
This is quite dangerous in that number of crowds can be > omp_get_max_threads()
This is used instead of actually passing number of threads/crowds
controlling threads all over RandomNumberControl.
Creates Random Number generators for crowds and step contexts This is quite dangerous in that number of crowds can be > omp_get_max_threads () This is used instead of actually passing number of threads / crowds controlling threads all over RandomNumberControl .
void QMCDriverNew::createRngsStepContexts()
{
  step_contexts_.resize(num_crowds_);
  TasksOneToOne<> do_per_crowd(num_crowds_);
  Rng.resize(num_crowds_);
  for(int i = 0; i < num_crowds_; ++i)
  {
    Rng[i].reset(new RandomGenerator_t(*(RandomNumberControl::Children[i])));
    step_contexts_[i].reset(new ContextForSteps(crowds_[i]->size(), population_.get_num_particles(),
                                            population_.get_particle_group_indexes(), *(Rng[i])));
  }
}
void QMCDriverNew :: createRngsStepContexts ( ) { step_contexts_ . resize ( num_crowds_ ) ; TasksOneToOne < > do_per_crowd ( num_crowds_ ) ; Rng . resize ( num_crowds_ ) ; for ( int i = 0 ; i < num_crowds_ ; ++ i ) { Rng [ i ] . reset ( new RandomGenerator_t ( * ( RandomNumberControl :: Children [ i ] ) ) ) ; step_contexts_ [ i ] . reset ( new ContextForSteps ( crowds_ [ i ] -> size ( ) , population_ . get_num_particles ( ) , population_ . get_particle_group_indexes ( ) , * ( Rng [ i ] ) ) ) ; } }
Creates Random Number generators for crowds and step contexts
  This is quite dangerous in that number of crowds can be > omp_get_max_threads()
  This is used instead of actually passing number of threads/crowds
  controlling threads all over RandomNumberControl.
Creates Random Number generators for crowds and step contexts This is quite dangerous in that number of crowds can be > omp_get_max_threads () This is used instead of actually passing number of threads / crowds controlling threads all over RandomNumberControl .