mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Remove old macros for threading
This commit is contained in:
parent
f1c31df9d2
commit
be1511d469
@ -134,7 +134,6 @@ void GeneticScheduler<V, T>::nextGeneration(void)
|
||||
LOG(Debug) << "Starting population:\n" << *this << std::endl;
|
||||
|
||||
// random mutations
|
||||
//PARALLEL_FOR_LOOP
|
||||
for (unsigned int i = 0; i < par_.popSize; ++i)
|
||||
{
|
||||
doMutation();
|
||||
@ -142,7 +141,6 @@ void GeneticScheduler<V, T>::nextGeneration(void)
|
||||
LOG(Debug) << "After mutations:\n" << *this << std::endl;
|
||||
|
||||
// mating
|
||||
//PARALLEL_FOR_LOOP
|
||||
for (unsigned int i = 0; i < par_.popSize/2; ++i)
|
||||
{
|
||||
doCrossover();
|
||||
@ -178,7 +176,7 @@ void GeneticScheduler<V, T>::doCrossover(void)
|
||||
Gene c1, c2;
|
||||
|
||||
crossover(c1, c2, p1, p2);
|
||||
PARALLEL_CRITICAL
|
||||
thread_critical
|
||||
{
|
||||
population_.insert(std::make_pair(func_(c1), c1));
|
||||
population_.insert(std::make_pair(func_(c2), c2));
|
||||
@ -198,7 +196,7 @@ void GeneticScheduler<V, T>::doMutation(void)
|
||||
|
||||
std::advance(it, pdis(gen_));
|
||||
mutation(m, it->second);
|
||||
PARALLEL_CRITICAL
|
||||
thread_critical
|
||||
{
|
||||
population_.insert(std::make_pair(func_(m), m));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user