Browse Source

change number of flops of a ctx: difference of flops instead of total flops

Andra Hugo 12 years ago
parent
commit
50dfbc0ca5
2 changed files with 5 additions and 5 deletions
  1. 1 1
      sc_hypervisor/include/sc_hypervisor.h
  2. 4 4
      sc_hypervisor/src/sc_hypervisor.c

+ 1 - 1
sc_hypervisor/include/sc_hypervisor.h

@@ -129,7 +129,7 @@ unsigned sc_hypervisor_can_resize(unsigned sched_ctx);
 void sc_hypervisor_set_type_of_task(struct starpu_codelet *cl, unsigned sched_ctx, uint32_t footprint, size_t data_size);
 
 /* change dynamically the total number of flops of a context, move the deadline of the finishing time of the context */
-void sc_hypervisor_update_total_flops(unsigned sched_ctx, double total_flops);
+void sc_hypervisor_update_diff_total_flops(unsigned sched_ctx, double diff_total_flops);
 
 #ifdef __cplusplus
 }

+ 4 - 4
sc_hypervisor/src/sc_hypervisor.c

@@ -983,11 +983,11 @@ struct types_of_workers* sc_hypervisor_get_types_of_workers(int *workers, unsign
 	return tw;
 }
 
-void sc_hypervisor_update_total_flops(unsigned sched_ctx, double total_flops)
+void sc_hypervisor_update_diff_total_flops(unsigned sched_ctx, double diff_total_flops)
 {
-	double diff = total_flops - hypervisor.sched_ctx_w[sched_ctx].total_flops;
+//	double diff = total_flops - hypervisor.sched_ctx_w[sched_ctx].total_flops;
 	starpu_pthread_mutex_lock(&act_hypervisor_mutex);
-	hypervisor.sched_ctx_w[sched_ctx].total_flops = total_flops;
-	hypervisor.sched_ctx_w[sched_ctx].remaining_flops += diff;	
+	hypervisor.sched_ctx_w[sched_ctx].total_flops += diff_total_flops;
+	hypervisor.sched_ctx_w[sched_ctx].remaining_flops += diff_total_flops;	
 	starpu_pthread_mutex_unlock(&act_hypervisor_mutex);
 }