17 #ifndef SC_HYPERVISOR_POLICY_H 
   18 #define SC_HYPERVISOR_POLICY_H 
   28 #define HYPERVISOR_REDIM_SAMPLE 0.02 
   29 #define HYPERVISOR_START_REDIM_SAMPLE 0.1 
   61 void sc_hypervisor_get_tasks_times(
int nw, 
int nt, 
double times[nw][nt], 
int *workers, 
unsigned size_ctxs, 
struct sc_hypervisor_policy_task_pool *task_pools);
 
   64 unsigned sc_hypervisor_find_lowest_prio_sched_ctx(
unsigned req_sched_ctx, 
int nworkers_to_move);
 
   67 int* sc_hypervisor_get_idlest_workers(
unsigned sched_ctx, 
int *nworkers, 
enum starpu_worker_archtype arch);
 
   70 int* sc_hypervisor_get_idlest_workers_in_list(
int *start, 
int *workers, 
int nall_workers,  
int *nworkers, 
enum starpu_worker_archtype arch);
 
   76 int sc_hypervisor_compute_nworkers_to_move(
unsigned req_sched_ctx);
 
   79 unsigned sc_hypervisor_policy_resize(
unsigned sender_sched_ctx, 
unsigned receiver_sched_ctx, 
unsigned force_resize, 
unsigned now);
 
   82 unsigned sc_hypervisor_policy_resize_to_unknown_receiver(
unsigned sender_sched_ctx, 
unsigned now);
 
   88 double sc_hypervisor_get_slowest_ctx_exec_time(
void);
 
   91 double sc_hypervisor_get_fastest_ctx_exec_time(
void);
 
  103 void sc_hypervisor_group_workers_by_type(
struct types_of_workers *tw, 
int *total_nw);
 
  112 unsigned sc_hypervisor_criteria_fulfilled(
unsigned sched_ctx, 
int worker);
 
  115 unsigned sc_hypervisor_check_idle(
unsigned sched_ctx, 
int worker);
 
  118 unsigned sc_hypervisor_check_speed_gap_btw_ctxs(
void);
 
  121 unsigned sc_hypervisor_get_resize_criteria();
 
  124 struct types_of_workers* sc_hypervisor_get_types_of_workers(
int *workers, 
unsigned nworkers);