Fixing assignment algorithm, who gave too many assignments by worker. Now, when using static assignment, the optimal size of packet (so as each worker has to process only one packet of data) is sent.

This commit is contained in:
Benjamin Bouvier 2012-07-12 19:15:07 +02:00
commit f963a15fbe
3 changed files with 16 additions and 11 deletions

View file

@ -137,7 +137,10 @@ namespace eo
{
unsigned int nbWorkers = workers.size();
freeWorkers = nbWorkers;
attributions.clear();
attributions.reserve( nbWorkers );
busy.clear();
busy.resize( nbWorkers, false );
// Let be the euclidean division of runs by nbWorkers :