From be1511d469f6fac6b3c5144092a88c875ab56f99 Mon Sep 17 00:00:00 2001 From: paboyle Date: Wed, 24 Jan 2018 13:23:24 +0000 Subject: [PATCH] Remove old macros for threading --- extras/Hadrons/GeneticScheduler.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extras/Hadrons/GeneticScheduler.hpp b/extras/Hadrons/GeneticScheduler.hpp index f199f1ed..76535a74 100644 --- a/extras/Hadrons/GeneticScheduler.hpp +++ b/extras/Hadrons/GeneticScheduler.hpp @@ -134,7 +134,6 @@ void GeneticScheduler::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::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::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::doMutation(void) std::advance(it, pdis(gen_)); mutation(m, it->second); - PARALLEL_CRITICAL + thread_critical { population_.insert(std::make_pair(func_(m), m)); }