|
@@ -982,3 +982,12 @@ struct types_of_workers* sc_hypervisor_get_types_of_workers(int *workers, unsign
|
|
|
if(tw->ncuda > 0) tw->nw++;
|
|
|
return tw;
|
|
|
}
|
|
|
+
|
|
|
+void sc_hypervisor_update_total_flops(unsigned sched_ctx, double 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;
|
|
|
+ starpu_pthread_mutex_unlock(&act_hypervisor_mutex);
|
|
|
+}
|