Accéder au contenu.
Menu Sympa

starpu-devel - [Starpu-devel] [PATCH v2 6/6] Reindent _dmda_push_task().

Objet : Developers list for StarPU

Archives de la liste

[Starpu-devel] [PATCH v2 6/6] Reindent _dmda_push_task().


Chronologique Discussions 
  • From: Cyril Roelandt <cyril.roelandt@inria.fr>
  • To: starpu-devel@lists.gforge.inria.fr
  • Subject: [Starpu-devel] [PATCH v2 6/6] Reindent _dmda_push_task().
  • Date: Mon, 22 Oct 2012 04:56:36 +0200
  • List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel>
  • List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>


Signed-off-by: Cyril Roelandt <cyril.roelandt@inria.fr>
---
.../deque_modeling_policy_data_aware.c | 46 ++++++++++---------
1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
b/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
index ff9d243..2475c2a 100644
--- a/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
+++ b/trunk/src/sched_policies/deque_modeling_policy_data_aware.c
@@ -484,34 +484,36 @@ static int _dmda_push_task(struct starpu_task *task,
unsigned prio)
if (forced_best == -1)
{
for (worker = 0; worker < nworkers; worker++)
- for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
{
- if (!starpu_worker_can_execute_task(worker, task,
nimpl))
+ for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS;
nimpl++)
{
- /* no one on that queue may execute this task
*/
- continue;
- }
+ if (!starpu_worker_can_execute_task(worker,
task, nimpl))
+ {
+ /* no one on that queue may execute
this task */
+ continue;
+ }

- fitness[worker][nimpl] =
alpha*(exp_end[worker][nimpl] - best_exp_end)
- + beta*(local_data_penalty[worker][nimpl])
- + _gamma*(local_power[worker][nimpl]);
+ fitness[worker][nimpl] =
alpha*(exp_end[worker][nimpl] - best_exp_end)
+ +
beta*(local_data_penalty[worker][nimpl])
+ + _gamma*(local_power[worker][nimpl]);

- if (exp_end[worker][nimpl] > max_exp_end)
- {
- /* This placement will make the computation
- * longer, take into account the idle
- * consumption of other cpus */
- fitness[worker][nimpl] += _gamma * idle_power
* (exp_end[worker][nimpl] - max_exp_end) / 1000000.0;
- }
+ if (exp_end[worker][nimpl] > max_exp_end)
+ {
+ /* This placement will make the
computation
+ * longer, take into account the idle
+ * consumption of other cpus */
+ fitness[worker][nimpl] += _gamma *
idle_power * (exp_end[worker][nimpl] - max_exp_end) / 1000000.0;
+ }

- if (best == -1 || fitness[worker][nimpl] <
best_fitness)
- {
- /* we found a better solution */
- best_fitness = fitness[worker][nimpl];
- best = worker;
- selected_impl = nimpl;
+ if (best == -1 || fitness[worker][nimpl] <
best_fitness)
+ {
+ /* we found a better solution */
+ best_fitness = fitness[worker][nimpl];
+ best = worker;
+ selected_impl = nimpl;

- // _STARPU_DEBUG("best
fitness (worker %d) %e = alpha*(%e) + beta(%e) +gamma(%e)\n", worker,
best_fitness, exp_end[worker][nimpl] - best_exp_end,
local_data_penalty[worker][nimpl], local_power[worker][nimpl]);
+ //_STARPU_DEBUG("best fitness (worker
%d) %e = alpha*(%e) + beta(%e) +gamma(%e)\n", worker, best_fitness,
exp_end[worker][nimpl] - best_exp_end, local_data_penalty[worker][nimpl],
local_power[worker][nimpl]);
+ }
}
}
}
--
1.7.9






Archives gérées par MHonArc 2.6.19+.

Haut de le page