@@ -128,6 +128,9 @@ unsigned sc_hypervisor_can_resize(unsigned sched_ctx);
/* indicate the types of tasks a context will execute in order to better decide the sizing of ctxs */
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);
+
#ifdef __cplusplus
}
#endif
@@ -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);
+}