fixed merge

This commit is contained in:
2023-12-03 17:46:15 +03:00
4 changed files with 97 additions and 11 deletions

View File

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