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

ran format.sh.

parent 6244a776
Branches
Tags
1 merge request!273Lean tasks
...@@ -930,32 +930,30 @@ void scheduler_reweight(struct scheduler *s, int verbose) { ...@@ -930,32 +930,30 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
switch (t->type) { switch (t->type) {
case task_type_sort: case task_type_sort:
cost = wscale * intrinsics_popcount(t->flags) * t->ci->count * cost = wscale * intrinsics_popcount(t->flags) * t->ci->count *
(sizeof(int) * 8 - intrinsics_clz(t->ci->count)); (sizeof(int) * 8 - intrinsics_clz(t->ci->count));
break; break;
case task_type_self: case task_type_self:
cost = 1 * wscale * t->ci->count * t->ci->count; cost = 1 * wscale * t->ci->count * t->ci->count;
break; break;
case task_type_pair: case task_type_pair:
if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID) if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID)
cost = cost = 3 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
3 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
else else
cost = cost = 2 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
2 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
break; break;
case task_type_sub_pair: case task_type_sub_pair:
if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID) { if (t->ci->nodeID != nodeID || t->cj->nodeID != nodeID) {
if (t->flags < 0) if (t->flags < 0)
cost = 3 * wscale * t->ci->count * t->cj->count; cost = 3 * wscale * t->ci->count * t->cj->count;
else else
cost = 3 * wscale * t->ci->count * t->cj->count * cost =
sid_scale[t->flags]; 3 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
} else { } else {
if (t->flags < 0) if (t->flags < 0)
cost = 2 * wscale * t->ci->count * t->cj->count; cost = 2 * wscale * t->ci->count * t->cj->count;
else else
cost = 2 * wscale * t->ci->count * t->cj->count * cost =
sid_scale[t->flags]; 2 * wscale * t->ci->count * t->cj->count * sid_scale[t->flags];
} }
break; break;
case task_type_sub_self: case task_type_sub_self:
......
...@@ -123,7 +123,7 @@ struct task { ...@@ -123,7 +123,7 @@ struct task {
/*! Weight of the task */ /*! Weight of the task */
int weight; int weight;
#if defined(WITH_MPI) && defined(HAVE_METIS) #if defined(WITH_MPI) && defined(HAVE_METIS)
/*! Individual cost estimate for this task. */ /*! Individual cost estimate for this task. */
int cost; int cost;
...@@ -149,7 +149,7 @@ struct task { ...@@ -149,7 +149,7 @@ struct task {
/*! Is this task implicit (i.e. does not do anything) ? */ /*! Is this task implicit (i.e. does not do anything) ? */
char implicit; char implicit;
#ifdef SWIFT_DEBUG_TASKS #ifdef SWIFT_DEBUG_TASKS
/*! ID of the queue or runner owning this task */ /*! ID of the queue or runner owning this task */
short int rid; short int rid;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment