瀏覽代碼

rename struct worker_collection to struct starpu_sched_ctx_worker_collection

Nathalie Furmento 12 年之前
父節點
當前提交
374dc95cb4

+ 11 - 11
doc/chapters/advanced-api.texi

@@ -557,7 +557,7 @@ This function removes the workers indicated in the first argument from the conte
 A scheduling context manages a collection of workers that can be memorized using different data structures. Thus, a generic structure is available in order to simplify the choice of its type. 
 Only the list data structure is available but further data structures(like tree) implementations are foreseen. 
 
-@deftp {Data Type} {struct worker_collection}
+@deftp {Data Type} {struct starpu_sched_ctx_worker_collection}
 @table @asis
 @item @code{void *workerids}
 The workerids managed by the collection
@@ -567,27 +567,27 @@ The number of workerids
 The cursor needed to iterate the collection (depending on the data structure)
 @item @code{int type}
 The type of structure (currently WORKER_LIST is the only one available) 
-@item @code{unsigned (*has_next)(struct worker_collection *workers)}
+@item @code{unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers)}
 Checks if there is a next worker
-@item @code{int (*get_next)(struct worker_collection *workers)}
+@item @code{int (*get_next)(struct starpu_sched_ctx_worker_collection *workers)}
 Gets the next worker
-@item @code{int (*add)(struct worker_collection *workers, int worker)}
+@item @code{int (*add)(struct starpu_sched_ctx_worker_collection *workers, int worker)}
 Adds a worker to the collection
-@item @code{int (*remove)(struct worker_collection *workers, int worker)}
+@item @code{int (*remove)(struct starpu_sched_ctx_worker_collection *workers, int worker)}
 Removes a worker from the collection
-@item @code{void* (*init)(struct worker_collection *workers)}
+@item @code{void* (*init)(struct starpu_sched_ctx_worker_collection *workers)}
 Initialize the collection
-@item @code{void (*deinit)(struct worker_collection *workers)}
+@item @code{void (*deinit)(struct starpu_sched_ctx_worker_collection *workers)}
 Deinitialize the colection
-@item @code{void (*init_cursor)(struct worker_collection *workers)} (optional)
+@item @code{void (*init_cursor)(struct starpu_sched_ctx_worker_collection *workers)} (optional)
 Initialize the cursor if there is one
-@item @code{void (*deinit_cursor)(struct worker_collection *workers)} (optional)
+@item @code{void (*deinit_cursor)(struct starpu_sched_ctx_worker_collection *workers)} (optional)
 Deinitialize the cursor if there is one
 
 @end table
 @end deftp
 
-@deftypefun struct worker_collection* starpu_create_worker_collection_for_sched_ctx (unsigned @var{sched_ctx_id}, int @var{type})
+@deftypefun struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_sched_ctx (unsigned @var{sched_ctx_id}, int @var{type})
 Creates a worker collection of the type indicated by the last parameter for the context specified through the first parameter.
 @end deftypefun
 
@@ -595,7 +595,7 @@ Creates a worker collection of the type indicated by the last parameter for the
 Deletes the worker collection of the specified scheduling context
 @end deftypefun
  
-@deftypefun struct worker_collection* starpu_get_worker_collection_of_sched_ctx (unsigned @var{sched_ctx_id})
+@deftypefun struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx (unsigned @var{sched_ctx_id})
 Returns the worker collection managed by the indicated context
 @end deftypefun
 

+ 18 - 16
include/starpu_sched_ctx.h

@@ -19,8 +19,9 @@
 
 #include <starpu.h>
 
-/* generic structure used by the scheduling contexts to iterated the workers */
-struct worker_collection {
+/* generic structure used by the scheduling contexts to iterate the workers */
+struct starpu_sched_ctx_worker_collection
+{
 	/* hidden data structure used to memorize the workers */
 	void *workerids;
 	/* the number of workers in the collection */
@@ -30,27 +31,28 @@ struct worker_collection {
 	/* the type of structure (WORKER_LIST,...) */
 	int type;
 	/* checks if there is another element in collection */
-	unsigned (*has_next)(struct worker_collection *workers);
+	unsigned (*has_next)(struct starpu_sched_ctx_worker_collection *workers);
 	/* return the next element in the collection */
-	int (*get_next)(struct worker_collection *workers);
+	int (*get_next)(struct starpu_sched_ctx_worker_collection *workers);
 	/* add a new element in the collection */
-	int (*add)(struct worker_collection *workers, int worker);
+	int (*add)(struct starpu_sched_ctx_worker_collection *workers, int worker);
 	/* remove an element from the collection */
-	int (*remove)(struct worker_collection *workers, int worker);
+	int (*remove)(struct starpu_sched_ctx_worker_collection *workers, int worker);
 	/* initialize the structure */
-	void* (*init)(struct worker_collection *workers);
+	void* (*init)(struct starpu_sched_ctx_worker_collection *workers);
 	/* free the structure */
-	void (*deinit)(struct worker_collection *workers);
+	void (*deinit)(struct starpu_sched_ctx_worker_collection *workers);
 	/* initialize the cursor if there is one */
-	void (*init_cursor)(struct worker_collection *workers);
+	void (*init_cursor)(struct starpu_sched_ctx_worker_collection *workers);
 	/* free the cursor if there is one */
-	void (*deinit_cursor)(struct worker_collection *workers);
+	void (*deinit_cursor)(struct starpu_sched_ctx_worker_collection *workers);
 };
 
 /* types of structures the worker collection can implement */
 #define WORKER_LIST 0
 
-struct starpu_performance_counters {
+struct starpu_performance_counters
+{
 	void (*notify_idle_cycle)(unsigned sched_ctx, int worker, double idle_time);
 	void (*notify_idle_end)(unsigned sched_ctx, int worker);
 	void (*notify_pushed_task)(unsigned sched_ctx, int worker);
@@ -67,7 +69,7 @@ void starpu_call_pushed_task_cb(int workerid, unsigned sched_ctx_id);
 
 unsigned starpu_create_sched_ctx(const char *policy_name, int *workerids_ctx, int nworkers_ctx, const char *sched_name);
 
-unsigned starpu_create_sched_ctx_inside_interval(const char *policy_name, const char *sched_name, 
+unsigned starpu_create_sched_ctx_inside_interval(const char *policy_name, const char *sched_name,
 						 int min_ncpus, int max_ncpus, int min_ngpus, int max_ngpus,
 						 unsigned allow_overlap);
 
@@ -89,11 +91,11 @@ void starpu_worker_init_sched_condition(unsigned sched_ctx, int workerid);
 
 void starpu_worker_deinit_sched_condition(unsigned sched_ctx, int workerid);
 
-struct worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int type);
-	
-void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id); 
+struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int type);
 
-struct worker_collection* starpu_get_worker_collection_of_sched_ctx(unsigned sched_ctx_id);
+void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id);
+
+struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx(unsigned sched_ctx_id);
 
 pthread_mutex_t* starpu_get_changing_ctx_mutex(unsigned sched_ctx_id);
 

+ 4 - 4
sched_ctx_hypervisor/src/hypervisor_policies/policy_tools.c

@@ -25,7 +25,7 @@ static int _compute_priority(unsigned sched_ctx)
 
 	int total_priority = 0;
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 	int worker;
 
 	if(workers->init_cursor)
@@ -109,7 +109,7 @@ int* _get_first_workers(unsigned sched_ctx, int *nworkers, enum starpu_archtype
 	for(i = 0; i < *nworkers; i++)
 		curr_workers[i] = -1;
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 	int index;
 	int worker;
 	int considered = 0;
@@ -178,7 +178,7 @@ int* _get_first_workers(unsigned sched_ctx, int *nworkers, enum starpu_archtype
 /* get the number of workers in the context that are allowed to be moved (that are not fixed) */
 unsigned _get_potential_nworkers(struct policy_config *config, unsigned sched_ctx, enum starpu_archtype arch)
 {
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 
 	unsigned potential_workers = 0;
 	int worker;
@@ -304,7 +304,7 @@ unsigned _resize_to_unknown_receiver(unsigned sender_sched_ctx, unsigned now)
 static double _get_elapsed_flops(struct sched_ctx_wrapper* sc_w, int *npus, enum starpu_archtype req_arch)
 {
 	double ret_val = 0.0;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sc_w->sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sc_w->sched_ctx);
         int worker;
 
 	if(workers->init_cursor)

+ 3 - 3
sched_ctx_hypervisor/src/hypervisor_policies/simple_policy.c

@@ -23,7 +23,7 @@ static int _compute_priority(unsigned sched_ctx)
 
 	int total_priority = 0;
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 	int worker;
 
 	if(workers->init_cursor)
@@ -82,7 +82,7 @@ int* _get_first_workers(unsigned sched_ctx, unsigned *nworkers, enum starpu_arch
 	for(i = 0; i < *nworkers; i++)
 		curr_workers[i] = -1;
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 	int index;
 	int worker;
 	int considered = 0;
@@ -150,7 +150,7 @@ int* _get_first_workers(unsigned sched_ctx, unsigned *nworkers, enum starpu_arch
 
 static unsigned _get_potential_nworkers(struct policy_config *config, unsigned sched_ctx, enum starpu_archtype arch)
 {
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 
 	unsigned potential_workers = 0;
 	int worker;

+ 1 - 1
sched_ctx_hypervisor/src/sched_ctx_hypervisor.c

@@ -327,7 +327,7 @@ static void _get_cpus(int *workers, int nworkers, int *cpus, int *ncpus)
 int get_nworkers_ctx(unsigned sched_ctx, enum starpu_archtype arch)
 {
 	int nworkers_ctx = 0;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
 	int worker;
 
 	if(workers->init_cursor)

+ 9 - 9
src/core/sched_ctx.c

@@ -18,7 +18,7 @@
 #include <core/sched_ctx.h>
 #include <common/utils.h>
 
-extern struct worker_collection worker_list;
+extern struct starpu_sched_ctx_worker_collection worker_list;
 static _starpu_pthread_mutex_t sched_ctx_manag = PTHREAD_MUTEX_INITIALIZER;
 static _starpu_pthread_mutex_t finished_submit_mutex = PTHREAD_MUTEX_INITIALIZER;
 struct starpu_task stop_submission_task = STARPU_TASK_INITIALIZER;
@@ -117,7 +117,7 @@ void starpu_stop_task_submission()
 static void _starpu_add_workers_to_sched_ctx(struct _starpu_sched_ctx *sched_ctx, int *workerids, int nworkers, 
 				       int *added_workers, int *n_added_workers)
 {
-	struct worker_collection *workers = sched_ctx->workers;
+	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 	struct _starpu_machine_config *config = (struct _starpu_machine_config *)_starpu_get_machine_config();
 
 	int nworkers_to_add = nworkers == -1 ? (int)config->topology.nworkers : nworkers;
@@ -158,7 +158,7 @@ static void _starpu_add_workers_to_sched_ctx(struct _starpu_sched_ctx *sched_ctx
 static void _starpu_remove_workers_from_sched_ctx(struct _starpu_sched_ctx *sched_ctx, int *workerids, 
 						  int nworkers, int *removed_workers, int *n_removed_workers)
 {
-	struct worker_collection *workers = sched_ctx->workers;
+	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 
 	int i = 0;
 
@@ -786,10 +786,10 @@ void starpu_worker_deinit_sched_condition(unsigned sched_ctx_id, int workerid)
 	free(sched_ctx->sched_cond[workerid]);
 }
 
-struct worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int worker_collection_type)
+struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int worker_collection_type)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
-	sched_ctx->workers = (struct worker_collection*)malloc(sizeof(struct worker_collection));
+	sched_ctx->workers = (struct starpu_sched_ctx_worker_collection*)malloc(sizeof(struct starpu_sched_ctx_worker_collection));
 
 	switch(worker_collection_type)
 	{
@@ -817,7 +817,7 @@ void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id)
 	free(sched_ctx->workers);
 }
 
-struct worker_collection* starpu_get_worker_collection_of_sched_ctx(unsigned sched_ctx_id)
+struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx(unsigned sched_ctx_id)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	return sched_ctx->workers;
@@ -827,7 +827,7 @@ int starpu_get_workers_of_sched_ctx(unsigned sched_ctx_id, int *pus, enum starpu
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	
-	struct worker_collection *workers = sched_ctx->workers;
+	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 	int worker;
 
 	int npus = 0;
@@ -869,8 +869,8 @@ unsigned starpu_get_nshared_workers(unsigned sched_ctx_id, unsigned sched_ctx_id
         struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
         struct _starpu_sched_ctx *sched_ctx2 = _starpu_get_sched_ctx_struct(sched_ctx_id2);
 
-        struct worker_collection *workers = sched_ctx->workers;
-        struct worker_collection *workers2 = sched_ctx2->workers;
+        struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
+        struct starpu_sched_ctx_worker_collection *workers2 = sched_ctx2->workers;
         int worker, worker2;
         int shared_workers = 0;
 

+ 1 - 1
src/core/sched_ctx.h

@@ -42,7 +42,7 @@ struct _starpu_sched_ctx {
 	/* data necessary for the policy */
 	void *policy_data;
 
-	struct worker_collection *workers;
+	struct starpu_sched_ctx_worker_collection *workers;
 	
 	/* mutex for temp_nworkers_in_ctx*/
 	_starpu_pthread_mutex_t changing_ctx_mutex;

+ 1 - 1
src/core/sched_policy.c

@@ -289,7 +289,7 @@ static int _starpu_push_task_on_specific_worker(struct starpu_task *task, int wo
 static int _starpu_nworkers_able_to_execute_task(struct starpu_task *task, struct _starpu_sched_ctx *sched_ctx)
 {
 	int worker = -1, nworkers = 0;
-	struct worker_collection *workers = sched_ctx->workers;
+	struct starpu_sched_ctx_worker_collection *workers = sched_ctx->workers;
 	if(workers->init_cursor)
 		workers->init_cursor(workers);
 

+ 1 - 1
src/core/workers.c

@@ -1265,7 +1265,7 @@ int starpu_worker_get_nids_ctx_free_by_type(enum starpu_archtype type, int *work
 			{
 				if(config.sched_ctxs[s].id != STARPU_NMAX_SCHED_CTXS)
 				{
-					struct worker_collection *workers = config.sched_ctxs[s].workers;
+					struct starpu_sched_ctx_worker_collection *workers = config.sched_ctxs[s].workers;
 					if(workers->init_cursor)
 						workers->init_cursor(workers);
 					

+ 3 - 3
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -343,7 +343,7 @@ static int _dm_push_task(struct starpu_task *task, unsigned prio, unsigned sched
 	
 	unsigned best_impl = 0;
 	unsigned nimpl;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 	
 	if(workers->init_cursor)
 		workers->init_cursor(workers);
@@ -465,7 +465,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 
 	starpu_task_bundle_t bundle = task->bundle;
 	dmda_data *dt = (dmda_data*)starpu_get_sched_ctx_policy_data(sched_ctx_id);
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 		
 	while(workers->has_next(workers))
 	{
@@ -578,7 +578,7 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned sch
 	int forced_impl = -1;
 
 	dmda_data *dt = (dmda_data*)starpu_get_sched_ctx_policy_data(sched_ctx_id);
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 	unsigned nworkers_ctx = workers->nworkers;
 	double local_task_length[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];
 	double local_data_penalty[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];

+ 3 - 3
src/sched_policies/detect_combined_workers.c

@@ -128,7 +128,7 @@ static void find_and_assign_combinations(hwloc_obj_t obj, unsigned synthesize_ar
 			if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 					sched_ctx_id = 0; 
 			
-			struct worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+			struct starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
 			int newworkerid = starpu_combined_worker_assign_workerid(nworkers, cpu_workers);
 			STARPU_ASSERT(newworkerid >= 0);
@@ -180,7 +180,7 @@ static void find_and_assign_combinations_without_hwloc(int *workerids, int nwork
     if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 	    sched_ctx_id = 0; 
 	
-    struct worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+    struct starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 	
 	
     /* We put the id of all CPU workers in this array */
@@ -228,7 +228,7 @@ static void combine_all_cpu_workers(int *workerids, int nworkers)
 	unsigned sched_ctx_id  = starpu_get_sched_ctx();
 	if(sched_ctx_id == STARPU_NMAX_SCHED_CTXS)
 		sched_ctx_id = 0;
-	struct worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 	int cpu_workers[STARPU_NMAXWORKERS];
 	int ncpus = 0;
 	struct _starpu_worker *worker;

+ 2 - 2
src/sched_policies/heft.c

@@ -321,7 +321,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 	heft_data *hd = (heft_data*)starpu_get_sched_ctx_policy_data(sched_ctx_id);
 
 	starpu_task_bundle_t bundle = task->bundle;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
 	while(workers->has_next(workers))
 	{
@@ -439,7 +439,7 @@ static int _heft_push_task(struct starpu_task *task, unsigned prio, unsigned sch
 	   there is no performance prediction available yet */
 	int forced_worker;
 	int forced_impl;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
 	unsigned nworkers_ctx = workers->nworkers;
 	double local_task_length[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];

+ 1 - 1
src/sched_policies/parallel_heft.c

@@ -244,7 +244,7 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio, uns
 {
 	pheft_data *hd = (pheft_data*)starpu_get_sched_ctx_policy_data(sched_ctx_id);
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 	unsigned nworkers_ctx = workers->nworkers;
 
 	unsigned worker, worker_ctx = 0;

+ 1 - 1
src/sched_policies/random_policy.c

@@ -31,7 +31,7 @@ static int _random_push_task(struct starpu_task *task, unsigned prio)
 	double alpha_sum = 0.0;
 
 	unsigned sched_ctx_id = task->sched_ctx;
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
         int worker;
         if(workers->init_cursor)
                 workers->init_cursor(workers);

+ 2 - 2
src/sched_policies/work_stealing_policy.c

@@ -147,7 +147,7 @@ static unsigned select_victim_overload(unsigned sched_ctx_id)
 	if (performed_total < calibration_value)
 		return select_victim_round_robin(sched_ctx_id);
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
         if(workers->init_cursor)
                 workers->init_cursor(workers);
@@ -189,7 +189,7 @@ static unsigned select_worker_overload(unsigned sched_ctx_id)
 	if (performed_total < calibration_value)
 		return select_worker_round_robin(sched_ctx_id);
 
-	struct worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
 
         if(workers->init_cursor)
                 workers->init_cursor(workers);

+ 10 - 10
src/worker_collection/worker_list.c

@@ -1,7 +1,7 @@
 #include <starpu.h>
 #include <pthread.h>
 
-static unsigned list_has_next(struct worker_collection *workers)
+static unsigned list_has_next(struct starpu_sched_ctx_worker_collection *workers)
 {
 	int nworkers = (int)workers->nworkers;
 
@@ -14,7 +14,7 @@ static unsigned list_has_next(struct worker_collection *workers)
 	return ret;
 }
 
-static int list_get_next(struct worker_collection *workers)
+static int list_get_next(struct starpu_sched_ctx_worker_collection *workers)
 {
 	int *workerids = (int *)workers->workerids;
 	int nworkers = (int)workers->nworkers;
@@ -28,7 +28,7 @@ static int list_get_next(struct worker_collection *workers)
 	return ret;
 }
 
-static unsigned _worker_belongs_to_ctx(struct worker_collection *workers, int workerid)
+static unsigned _worker_belongs_to_ctx(struct starpu_sched_ctx_worker_collection *workers, int workerid)
 {
 	int *workerids = (int *)workers->workerids;
 	unsigned nworkers = workers->nworkers;
@@ -42,7 +42,7 @@ static unsigned _worker_belongs_to_ctx(struct worker_collection *workers, int wo
 	return 0;
 }
 
-static int list_add(struct worker_collection *workers, int worker)
+static int list_add(struct starpu_sched_ctx_worker_collection *workers, int worker)
 {
 	int *workerids = (int *)workers->workerids;
 	unsigned *nworkers = &workers->nworkers;
@@ -90,7 +90,7 @@ static void _rearange_workerids(int *workerids, int old_nworkers)
 	  }
 }
 
-static int list_remove(struct worker_collection *workers, int worker)
+static int list_remove(struct starpu_sched_ctx_worker_collection *workers, int worker)
 {
 	int *workerids = (int *)workers->workerids;
 	unsigned nworkers = workers->nworkers;
@@ -122,7 +122,7 @@ static void _init_workers(int *workerids)
 	return;
 }
 
-static void* list_init(struct worker_collection *workers)
+static void* list_init(struct starpu_sched_ctx_worker_collection *workers)
 {
 	int *workerids = (int*)malloc(STARPU_NMAXWORKERS * sizeof(int));
 	_init_workers(workerids);
@@ -132,27 +132,27 @@ static void* list_init(struct worker_collection *workers)
 	return (void*)workerids;
 }
 
-static void list_deinit(struct worker_collection *workers)
+static void list_deinit(struct starpu_sched_ctx_worker_collection *workers)
 {
 	free(workers->workerids);
 	pthread_key_delete(workers->cursor_key);
 }
 
-static void list_init_cursor(struct worker_collection *workers)
+static void list_init_cursor(struct starpu_sched_ctx_worker_collection *workers)
 {
 	int *cursor = (int*)malloc(sizeof(int));
 	*cursor = 0;
 	pthread_setspecific(workers->cursor_key, (void*)cursor);
 }
 
-static void list_deinit_cursor(struct worker_collection *workers)
+static void list_deinit_cursor(struct starpu_sched_ctx_worker_collection *workers)
 {
 	int *cursor = (int*)pthread_getspecific(workers->cursor_key);
 	*cursor = 0;
 	free(cursor);
 }
 
-struct worker_collection worker_list = {
+struct starpu_sched_ctx_worker_collection worker_list = {
 	.has_next = list_has_next,
 	.get_next = list_get_next,
 	.add = list_add,