17 #ifndef SC_HYPERVISOR_LP_H 
   18 #define SC_HYPERVISOR_LP_H 
   31 #ifdef STARPU_HAVE_GLPK_H 
   33 #endif //STARPU_HAVE_GLPK_H 
   38 double sc_hypervisor_lp_get_nworkers_per_ctx(
int nsched_ctxs, 
int ntypes_of_workers, 
double res[nsched_ctxs][ntypes_of_workers], 
int total_nw[ntypes_of_workers], 
struct types_of_workers *tw);
 
   41 double sc_hypervisor_lp_get_tmax(
int nw, 
int *workers);
 
   44 void sc_hypervisor_lp_round_double_to_int(
int ns, 
int nw, 
double res[ns][nw], 
int res_rounded[ns][nw]);
 
   47 void sc_hypervisor_lp_redistribute_resources_in_ctxs(
int ns, 
int nw, 
int res_rounded[ns][nw], 
double res[ns][nw], 
unsigned *sched_ctxs, 
struct types_of_workers *tw);
 
   50 void sc_hypervisor_lp_distribute_resources_in_ctxs(
unsigned* sched_ctxs, 
int ns, 
int nw, 
int res_rounded[ns][nw], 
double res[ns][nw], 
int *workers, 
int nworkers, 
struct types_of_workers *tw);
 
   53 void sc_hypervisor_lp_place_resources_in_ctx(
int ns, 
int nw, 
double w_in_s[ns][nw], 
unsigned *sched_ctxs, 
int *workers, 
unsigned do_size, 
struct types_of_workers *tw);
 
   56 void sc_hypervisor_lp_share_remaining_resources(
int ns, 
unsigned *sched_ctxs,  
int nworkers, 
int *workers);
 
   59 double sc_hypervisor_lp_find_tmax(
double t1, 
double t2);
 
   62 unsigned sc_hypervisor_lp_execute_dichotomy(
int ns, 
int nw, 
double w_in_s[ns][nw], 
unsigned solve_lp_integer, 
void *specific_data,
 
   63                                             double tmin, 
double tmax, 
double smallest_tmax,
 
   64                                             double (*lp_estimated_distrib_func)(
int ns, 
int nw, 
double draft_w_in_s[ns][nw], 
 
   65                                                                              unsigned is_integer, 
double tmax, 
void *specifc_data));
 
   67 #ifdef STARPU_HAVE_GLPK_H 
   70 double sc_hypervisor_lp_simulate_distrib_flops(
int nsched_ctxs, 
int ntypes_of_workers, 
double speed[nsched_ctxs][ntypes_of_workers], 
 
   71                                                double flops[nsched_ctxs], 
double res[nsched_ctxs][ntypes_of_workers], 
int total_nw[ntypes_of_workers], 
 
   72                                                unsigned sched_ctxs[nsched_ctxs], 
double vmax);
 
   75 double sc_hypervisor_lp_simulate_distrib_tasks(
int ns, 
int nw, 
int nt, 
double w_in_s[ns][nw], 
double tasks[nw][nt],
 
   76                                                double times[nw][nt], 
unsigned is_integer, 
double tmax, 
unsigned *in_sched_ctxs,
 
   81 double sc_hypervisor_lp_simulate_distrib_flops_on_sample(
int ns, 
int nw, 
double final_w_in_s[ns][nw], 
unsigned is_integer, 
double tmax, 
 
   82                                                          double **speed, 
double flops[ns], 
double **final_flops_on_w);
 
   83 #endif // STARPU_HAVE_GLPK_H