Objet : Developers list for StarPU
Archives de la liste
- 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
- Re: [Starpu-devel] [PATCH 7/7] Handle bundles in deque_modeling_policy_data_aware.c., (suite)
- Re: [Starpu-devel] [PATCH 7/7] Handle bundles in deque_modeling_policy_data_aware.c., Samuel Thibault, 19/10/2012
- [Starpu-devel] [PATCH 1/7] src/sched_policies/heft.c: use an array of _starpu_fifo_taskq* rather than multiple global variables., Cyril Roelandt, 16/10/2012
- Re: [Starpu-devel] [PATCH 0/7][Review needed] A first step towards the factorization of heft and dm*., Samuel Thibault, 19/10/2012
- Re: [Starpu-devel] [PATCH 0/7][Review needed] A first step towards the factorization of heft and dm*., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 1/6] src/sched_policies/heft.c: use an array of _starpu_fifo_taskq* rather than multiple global variables., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 2/6] _starpu_fifo_push_task(): Fix "TODO: if prio, put at back"., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 3/6] Heft: use a scheduler-specific fifo rather than pushing tasks directly to the workers' local tasks., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 4/6] heft.c: Remove the "bundle" parameter from compute_all_performance_predictions()., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 5/6] src/sched_policies/deque_modeling_policy_data_aware.c: add a compute_all_performance_predictions() function., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 6/6] Reindent _dmda_push_task()., Cyril Roelandt, 22/10/2012
- Re: [Starpu-devel] [PATCH 0/7][Review needed] A first step towards the factorization of heft and dm*., Samuel Thibault, 22/10/2012
- Re: [Starpu-devel] [PATCH 0/7][Review needed] A first step towards the factorization of heft and dm*., Cyril Roelandt, 22/10/2012
- [Starpu-devel] [PATCH v2 1/6] src/sched_policies/heft.c: use an array of _starpu_fifo_taskq* rather than multiple global variables., Cyril Roelandt, 22/10/2012
- Re: [Starpu-devel] [PATCH 0/7][Review needed] A first step towards the factorization of heft and dm*., Cyril Roelandt, 22/10/2012
Archives gérées par MHonArc 2.6.19+.