Browse Source

sched_ctx: more renaming

	starpu_create_worker_collection_for_sched_ctx --> starpu_sched_ctx_create_worker_collection
	starpu_delete_worker_collection_for_sched_ctx --> starpu_sched_ctx_delete_worker_collection
	starpu_get_worker_collection_of_sched_ctx --> starpu_sched_ctx_get_worker_collection
Nathalie Furmento 12 years ago
parent
commit
ebc7bd8f30

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

@@ -587,15 +587,15 @@ Deinitialize the cursor if there is one
 @end table
 @end deftp
 
-@deftypefun struct starpu_sched_ctx_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_sched_ctx_create_worker_collection (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
 
-@deftypefun void starpu_delete_worker_collection_for_sched_ctx (unsigned @var{sched_ctx_id})
+@deftypefun void starpu_sched_ctx_delete_worker_collection (unsigned @var{sched_ctx_id})
 Deletes the worker collection of the specified scheduling context
 @end deftypefun
 
-@deftypefun struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx (unsigned @var{sched_ctx_id})
+@deftypefun struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_get_worker_collection (unsigned @var{sched_ctx_id})
 Returns the worker collection managed by the indicated context
 @end deftypefun
 

+ 2 - 2
examples/scheduler/dummy_sched.c

@@ -53,7 +53,7 @@ static void dummy_sched_remove_workers(unsigned sched_ctx_id, int *workerids, un
 
 static void init_dummy_sched(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	struct dummy_sched_data *data = (struct dummy_sched_data*)malloc(sizeof(struct dummy_sched_data));
 	
@@ -78,7 +78,7 @@ static void deinit_dummy_sched(unsigned sched_ctx_id)
 	pthread_cond_destroy(&data->sched_cond);
 	pthread_mutex_destroy(&data->sched_mutex);
 
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 
 	free(data);
 	

+ 3 - 3
include/starpu_sched_ctx.h

@@ -113,11 +113,11 @@ void starpu_sched_ctx_init_worker_mutex_and_cond(unsigned sched_ctx_id, int work
 
 void starpu_sched_ctx_deinit_worker_mutex_and_cond(unsigned sched_ctx_id, int workerid);
 
-struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_sched_ctx(unsigned sched_ctx_id, int type);
+struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_create_worker_collection(unsigned sched_ctx_id, int type);
 
-void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id);
+void starpu_sched_ctx_delete_worker_collection(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_worker_collection* starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id);
 
 #if !defined(_MSC_VER) && !defined(STARPU_SIMGRID)
 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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_hypervisor_policy_config *config, unsigned sched_ctx, enum starpu_archtype arch)
 {
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_hypervisor_wrapper* sc_w, int *npus, enum starpu_archtype req_arch)
 {
 	double ret_val = 0.0;
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sc_w->sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_hypervisor_policy_config *config, unsigned sched_ctx, enum starpu_archtype arch)
 {
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx);
 	int worker;
 
 	if(workers->init_cursor)

+ 3 - 3
src/core/sched_ctx.c

@@ -786,7 +786,7 @@ void starpu_sched_ctx_deinit_worker_mutex_and_cond(unsigned sched_ctx_id, int wo
 	free(sched_ctx->sched_cond[workerid]);
 }
 
-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_worker_collection* starpu_sched_ctx_create_worker_collection(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 starpu_sched_ctx_worker_collection*)malloc(sizeof(struct starpu_sched_ctx_worker_collection));
@@ -809,7 +809,7 @@ struct starpu_sched_ctx_worker_collection* starpu_create_worker_collection_for_s
 	return sched_ctx->workers;
 }
 
-void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id)
+void starpu_sched_ctx_delete_worker_collection(unsigned sched_ctx_id)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	sched_ctx->workers->deinit(sched_ctx->workers);
@@ -817,7 +817,7 @@ void starpu_delete_worker_collection_for_sched_ctx(unsigned sched_ctx_id)
 	free(sched_ctx->workers);
 }
 
-struct starpu_sched_ctx_worker_collection* starpu_get_worker_collection_of_sched_ctx(unsigned sched_ctx_id)
+struct starpu_sched_ctx_worker_collection* starpu_sched_ctx_get_worker_collection(unsigned sched_ctx_id)
 {
 	struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(sched_ctx_id);
 	return sched_ctx->workers;

+ 5 - 5
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -345,7 +345,7 @@ static int _dm_push_task(struct starpu_task *task, unsigned prio, unsigned sched
 
 	unsigned best_impl = 0;
 	unsigned nimpl;
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 	if(workers->init_cursor)
 		workers->init_cursor(workers);
@@ -467,7 +467,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 
 	starpu_task_bundle_t bundle = task->bundle;
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 	while(workers->has_next(workers))
 	{
@@ -580,7 +580,7 @@ static int _dmda_push_task(struct starpu_task *task, unsigned prio, unsigned sch
 	int forced_impl = -1;
 
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	unsigned nworkers_ctx = workers->nworkers;
 	double local_task_length[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];
 	double local_data_penalty[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];
@@ -776,7 +776,7 @@ static void dmda_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned
 
 static void initialize_dmda_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)malloc(sizeof(struct _starpu_dmda_data));
 	dt->alpha = _STARPU_DEFAULT_ALPHA;
@@ -830,7 +830,7 @@ static void deinitialize_dmda_policy(unsigned sched_ctx_id)
 	struct _starpu_dmda_data *dt = (struct _starpu_dmda_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	free(dt->queue_array);
 	free(dt);
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 
 	_STARPU_DEBUG("total_task_cnt %ld ready_task_cnt %ld -> %f\n", dt->total_task_cnt, dt->ready_task_cnt, (100.0f*dt->ready_task_cnt)/dt->total_task_cnt);
 }

+ 3 - 3
src/sched_policies/detect_combined_workers.c

@@ -129,7 +129,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 starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+		struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 		int newworkerid = starpu_combined_worker_assign_workerid(nworkers, cpu_workers);
 		STARPU_ASSERT(newworkerid >= 0);
@@ -182,7 +182,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 starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 	/* We put the id of all CPU workers in this array */
 	int cpu_workers[STARPU_NMAXWORKERS];
@@ -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 starpu_sched_ctx_worker_collection* workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection* workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	int cpu_workers[STARPU_NMAXWORKERS];
 	int ncpus = 0;
 	struct _starpu_worker *worker;

+ 2 - 2
src/sched_policies/eager_central_policy.c

@@ -56,7 +56,7 @@ static void eager_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned
 
 static void initialize_eager_center_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	struct _starpu_eager_center_policy_data *data = (struct _starpu_eager_center_policy_data*)malloc(sizeof(struct _starpu_eager_center_policy_data));
 
@@ -83,7 +83,7 @@ static void deinitialize_eager_center_policy(unsigned sched_ctx_id)
 	_STARPU_PTHREAD_MUTEX_DESTROY(&data->sched_mutex);
 	_STARPU_PTHREAD_COND_DESTROY(&data->sched_cond);
 
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 
 	free(data);
 }

+ 2 - 2
src/sched_policies/eager_central_priority_policy.c

@@ -101,7 +101,7 @@ static void eager_priority_remove_workers(unsigned sched_ctx_id, int *workerids,
 
 static void initialize_eager_center_priority_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 	struct _starpu_eager_central_prio_data *data = (struct _starpu_eager_central_prio_data*)malloc(sizeof(struct _starpu_eager_central_prio_data));
 
 	/* In this policy, we support more than two levels of priority. */
@@ -127,7 +127,7 @@ static void deinitialize_eager_center_priority_policy(unsigned sched_ctx_id)
 	_STARPU_PTHREAD_MUTEX_DESTROY(&data->sched_mutex);
         _STARPU_PTHREAD_COND_DESTROY(&data->sched_cond);
 
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
         free(data);
 }
 

+ 4 - 4
src/sched_policies/heft.c

@@ -101,7 +101,7 @@ static void heft_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned
 
 static void heft_init(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	heft_data *hd = (heft_data*)malloc(sizeof(heft_data));
 	hd->alpha = _STARPU_DEFAULT_ALPHA;
@@ -321,7 +321,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 	heft_data *hd = (heft_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 
 	starpu_task_bundle_t bundle = task->bundle;
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
 	unsigned nworkers_ctx = workers->nworkers;
 	double local_task_length[STARPU_NMAXWORKERS][STARPU_MAXIMPLEMENTATIONS];
@@ -621,7 +621,7 @@ static void heft_deinit(unsigned sched_ctx_id)
 {
 	heft_data *ht = (heft_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 	free(ht);
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 }
 
 struct starpu_sched_policy _starpu_sched_heft_policy =

+ 2 - 2
src/sched_policies/parallel_greedy.c

@@ -146,7 +146,7 @@ static void pgreedy_remove_workers(unsigned sched_ctx_id, int *workerids, unsign
 
 static void initialize_pgreedy_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	struct _starpu_pgreedy_data *data = (struct _starpu_pgreedy_data*)malloc(sizeof(struct _starpu_pgreedy_data));
 	/* masters pick tasks from that queue */
@@ -169,7 +169,7 @@ static void deinitialize_pgreedy_policy(unsigned sched_ctx_id)
 	_STARPU_PTHREAD_MUTEX_DESTROY(&data->sched_mutex);
 	_STARPU_PTHREAD_COND_DESTROY(&data->sched_cond);
 
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 
 	free(data);
 }

+ 3 - 3
src/sched_policies/parallel_heft.c

@@ -245,7 +245,7 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio, uns
 {
 	struct _starpu_pheft_data *hd = (struct _starpu_pheft_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
 
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 	unsigned nworkers_ctx = workers->nworkers;
 
 	unsigned worker, worker_ctx = 0;
@@ -550,7 +550,7 @@ static void parallel_heft_remove_workers(unsigned sched_ctx_id, int *workerids,
 }
 static void initialize_parallel_heft_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 	struct _starpu_pheft_data *hd = (struct _starpu_pheft_data*)malloc(sizeof(struct _starpu_pheft_data));
 	hd->alpha = _STARPU_DEFAULT_ALPHA;
 	hd->beta = _STARPU_DEFAULT_BETA;
@@ -582,7 +582,7 @@ static void initialize_parallel_heft_policy(unsigned sched_ctx_id)
 static void parallel_heft_deinit(unsigned sched_ctx_id)
 {
 	struct _starpu_pheft_data *hd = (struct _starpu_pheft_data*)starpu_sched_ctx_get_policy_data(sched_ctx_id);
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 	_STARPU_PTHREAD_MUTEX_DESTROY(&hd->global_push_mutex);
 	free(hd);
 }

+ 3 - 3
src/sched_policies/random_policy.c

@@ -34,7 +34,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 starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
         int worker;
         if(workers->init_cursor)
                 workers->init_cursor(workers);
@@ -129,13 +129,13 @@ static void random_remove_workers(unsigned sched_ctx_id, int *workerids, unsigne
 
 static void initialize_random_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 	starpu_srand48(time(NULL));
 }
 
 static void deinitialize_random_policy(unsigned sched_ctx_id)
 {
-	starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+	starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 }
 
 struct starpu_sched_policy _starpu_sched_random_policy =

+ 4 - 4
src/sched_policies/work_stealing_policy.c

@@ -148,7 +148,7 @@ static unsigned select_victim_overload(unsigned sched_ctx_id)
 	if (performed_total < calibration_value)
 		return select_victim_round_robin(sched_ctx_id);
 
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
         if(workers->init_cursor)
                 workers->init_cursor(workers);
@@ -190,7 +190,7 @@ static unsigned select_worker_overload(unsigned sched_ctx_id)
 	if (performed_total < calibration_value)
 		return select_worker_round_robin(sched_ctx_id);
 
-	struct starpu_sched_ctx_worker_collection *workers = starpu_get_worker_collection_of_sched_ctx(sched_ctx_id);
+	struct starpu_sched_ctx_worker_collection *workers = starpu_sched_ctx_get_worker_collection(sched_ctx_id);
 
         if(workers->init_cursor)
                 workers->init_cursor(workers);
@@ -381,7 +381,7 @@ static void ws_remove_workers(unsigned sched_ctx_id, int *workerids, unsigned nw
 
 static void initialize_ws_policy(unsigned sched_ctx_id)
 {
-	starpu_create_worker_collection_for_sched_ctx(sched_ctx_id, WORKER_LIST);
+	starpu_sched_ctx_create_worker_collection(sched_ctx_id, WORKER_LIST);
 
 	struct _starpu_work_stealing_data *ws = (struct _starpu_work_stealing_data*)malloc(sizeof(struct _starpu_work_stealing_data));
 	starpu_sched_ctx_set_policy_data(sched_ctx_id, (void*)ws);
@@ -409,7 +409,7 @@ static void deinit_ws_policy(unsigned sched_ctx_id)
 	_STARPU_PTHREAD_MUTEX_DESTROY(&ws->sched_mutex);
 	_STARPU_PTHREAD_COND_DESTROY(&ws->sched_cond);
         free(ws);
-        starpu_delete_worker_collection_for_sched_ctx(sched_ctx_id);
+        starpu_sched_ctx_delete_worker_collection(sched_ctx_id);
 }
 
 struct starpu_sched_policy _starpu_sched_ws_policy =