Commit e95331dd authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make scheduler_reweight() robust against empty cells.

parent 600d1aa6
......@@ -1191,9 +1191,9 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
t->weight = t->unlock_tasks[j]->weight;
float cost = 0;
const float count_i = t->ci->count;
const float count_i = (t->ci != NULL) ? t->ci->count : 0.f;
const float count_j = (t->cj != NULL) ? t->cj->count : 0.f;
const float gcount_i = t->ci->gcount;
const float gcount_i = (t->ci != NULL) ? t->ci->gcount : 0.f;
const float gcount_j = (t->cj != NULL) ? t->cj->gcount : 0.f;
switch (t->type) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment