From 2f811cd4e0e9a86faa406ef8232c0e764f9d369d Mon Sep 17 00:00:00 2001 From: Pedro Gonnet <pedro.gonnet@durham.ac.uk> Date: Thu, 4 Jul 2013 13:27:08 +0000 Subject: [PATCH] be more specific in weighting pair tasks. Former-commit-id: 21530fafed43728ce2a3292741766b4e2f47f8ba --- src/scheduler.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/scheduler.c b/src/scheduler.c index 4d880b01c4..b47c0da7d5 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -564,6 +564,9 @@ void scheduler_reweight ( struct scheduler *s ) { int k, j, nr_tasks = s->nr_tasks, *tid = s->tasks_ind; struct task *t, *tasks = s->tasks; + float sid_scale[13] = { 0.1897 , 0.4025 , 0.1897 , 0.4025 , 0.5788 , 0.4025 , + 0.1897 , 0.4025 , 0.1897 , 0.4025 , 0.5788 , 0.4025 , + 0.5788 }; // ticks tic; /* Run throught the tasks backwards and set their waits and @@ -587,11 +590,11 @@ void scheduler_reweight ( struct scheduler *s ) { t->weight += 2 * t->ci->count * t->ci->count; break; case task_type_pair: - t->weight += 2 * t->ci->count * t->cj->count; + t->weight += 2 * sid_scale[ t->flags ] * t->ci->count * t->cj->count; break; case task_type_sub: if ( t->cj != NULL ) - t->weight += 2 * t->ci->count * t->cj->count; + t->weight += 2 * sid_scale[ t->flags ] * t->ci->count * t->cj->count; else t->weight += 2 * t->ci->count * t->ci->count; break; -- GitLab