Skip to content
Snippets Groups Projects
Commit 2f811cd4 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

be more specific in weighting pair tasks.

Former-commit-id: 21530fafed43728ce2a3292741766b4e2f47f8ba
parent c4789512
No related branches found
No related tags found
No related merge requests found
...@@ -564,6 +564,9 @@ void scheduler_reweight ( struct scheduler *s ) { ...@@ -564,6 +564,9 @@ void scheduler_reweight ( struct scheduler *s ) {
int k, j, nr_tasks = s->nr_tasks, *tid = s->tasks_ind; int k, j, nr_tasks = s->nr_tasks, *tid = s->tasks_ind;
struct task *t, *tasks = s->tasks; 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; // ticks tic;
/* Run throught the tasks backwards and set their waits and /* Run throught the tasks backwards and set their waits and
...@@ -587,11 +590,11 @@ void scheduler_reweight ( struct scheduler *s ) { ...@@ -587,11 +590,11 @@ void scheduler_reweight ( struct scheduler *s ) {
t->weight += 2 * t->ci->count * t->ci->count; t->weight += 2 * t->ci->count * t->ci->count;
break; break;
case task_type_pair: 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; break;
case task_type_sub: case task_type_sub:
if ( t->cj != NULL ) 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 else
t->weight += 2 * t->ci->count * t->ci->count; t->weight += 2 * t->ci->count * t->ci->count;
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment