mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-10 03:17:07 +01:00
Genetic scheduler: uses insert instead of emplace for better compiler compatibility
This commit is contained in:
@ -166,7 +166,7 @@ void GeneticScheduler<T>::initPopulation(void)
|
||||
{
|
||||
auto p = graph_.topoSort(gen_);
|
||||
|
||||
population_.emplace(func_(p), p);
|
||||
population_.insert(std::make_pair(func_(p), p));
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,8 +180,8 @@ void GeneticScheduler<T>::doCrossover(void)
|
||||
crossover(c1, c2, p1, p2);
|
||||
PARALLEL_CRITICAL
|
||||
{
|
||||
population_.emplace(func_(c1), c1);
|
||||
population_.emplace(func_(c2), c2);
|
||||
population_.insert(std::make_pair(func_(c1), c1));
|
||||
population_.insert(std::make_pair(func_(c2), c2));
|
||||
}
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ void GeneticScheduler<T>::doMutation(void)
|
||||
mutation(m, it->second);
|
||||
PARALLEL_CRITICAL
|
||||
{
|
||||
population_.emplace(func_(m), m);
|
||||
population_.insert(std::make_pair(func_(m), m));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user