1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

Genetic scheduler: uses insert instead of emplace for better compiler compatibility

This commit is contained in:
Antonin Portelli 2017-01-19 14:08:22 -08:00
parent 41df1db811
commit 24d3d31b01

View File

@ -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));
}
}
}