fixed merge
This commit is contained in:
@@ -161,6 +161,7 @@ public:
|
||||
map<int, queue<T*>, std::greater<int>> sortedByKernelNeeds;
|
||||
|
||||
long activeTasks = 0;
|
||||
long done = 0;
|
||||
for (auto& task : this->getElements()) {
|
||||
if (task->getState() == WorkspaceReady) {
|
||||
activeTasks++;
|
||||
@@ -175,6 +176,7 @@ public:
|
||||
bool ignoreCheck = true;
|
||||
|
||||
while (activeTasks) {
|
||||
long oldActiveTasks = activeTasks;
|
||||
vector<int> emptyKeys;
|
||||
|
||||
//ставим задачи от больших к меньшему по ядрам
|
||||
@@ -215,6 +217,7 @@ public:
|
||||
it++;
|
||||
activeTaskSet.erase(task);
|
||||
activeTasks--;
|
||||
done++;
|
||||
busyKernels -= task->getKernels();
|
||||
printf(" done task with %d kernels and id %ld\n", task->getKernels(), task->getId());
|
||||
|
||||
@@ -222,6 +225,9 @@ public:
|
||||
}
|
||||
it++;
|
||||
}
|
||||
|
||||
if (oldActiveTasks != activeTasks)
|
||||
printf("done %ld / %ld\n", done, this->getLength());
|
||||
}
|
||||
|
||||
changeState();
|
||||
|
||||
Reference in New Issue
Block a user