Bladeren bron

Rename _starpu_prio_deque_push_task to _starpu_prio_deque_push_front_task

as it seems to have brought confusion between front and back with _starpu_prio_deque_push_back_task
Samuel Thibault 6 jaren geleden
bovenliggende
commit
e6ac871fa3

+ 2 - 2
src/sched_policies/component_heft.c

@@ -130,7 +130,7 @@ static int heft_progress_one(struct starpu_sched_component *component)
 		STARPU_COMPONENT_MUTEX_LOCK(mutex);
 		for (n = ntasks - 1; n < ntasks; n--)
 			if ((int) n != best_task)
-				_starpu_prio_deque_push_task(prio, tasks[n]);
+				_starpu_prio_deque_push_front_task(prio, tasks[n]);
 		STARPU_COMPONENT_MUTEX_UNLOCK(mutex);
 
 		/* And now find out which worker suits best for this task,
@@ -173,7 +173,7 @@ static int heft_progress_one(struct starpu_sched_component *component)
 		{
 			/* Could not push to child actually, push that one back too */
 			STARPU_COMPONENT_MUTEX_LOCK(mutex);
-			_starpu_prio_deque_push_task(prio, tasks[best_task]);
+			_starpu_prio_deque_push_front_task(prio, tasks[best_task]);
 			STARPU_COMPONENT_MUTEX_UNLOCK(mutex);
 			return 1;
 		}

+ 1 - 1
src/sched_policies/component_prio.c

@@ -132,7 +132,7 @@ static int prio_push_local_task(struct starpu_sched_component * component, struc
 	else
 	{
 		if(is_pushback)
-			ret = _starpu_prio_deque_push_task(prio,task);
+			ret = _starpu_prio_deque_push_front_task(prio,task);
 		else
 		{
 			ret = _starpu_prio_deque_push_back_task(prio,task);

+ 2 - 2
src/sched_policies/component_work_stealing.c

@@ -241,7 +241,7 @@ static int push_task(struct starpu_sched_component * component, struct starpu_ta
 	i = (i+1)%component->nchildren;
 	STARPU_COMPONENT_MUTEX_LOCK(wsd->mutexes[i]);
 	starpu_sched_task_break(task);
-	ret = _starpu_prio_deque_push_task(wsd->fifos[i], task);
+	ret = _starpu_prio_deque_push_front_task(wsd->fifos[i], task);
 	STARPU_COMPONENT_MUTEX_UNLOCK(wsd->mutexes[i]);
 
 	wsd->last_push_child = i;
@@ -275,7 +275,7 @@ int starpu_sched_tree_work_stealing_push_task(struct starpu_task *task)
 
 			struct _starpu_work_stealing_data * wsd = component->data;
 			STARPU_COMPONENT_MUTEX_LOCK(wsd->mutexes[i]);
-			int ret = _starpu_prio_deque_push_task(wsd->fifos[i] , task);
+			int ret = _starpu_prio_deque_push_front_task(wsd->fifos[i] , task);
 			if(ret == 0 && !isnan(task->predicted))
 				wsd->fifos[i]->exp_len += task->predicted;
 			STARPU_COMPONENT_MUTEX_UNLOCK(wsd->mutexes[i]);

+ 1 - 1
src/sched_policies/heteroprio.c

@@ -519,7 +519,7 @@ static struct starpu_task *pop_task_heteroprio_policy(unsigned sched_ctx_id)
 				STARPU_ASSERT(starpu_worker_can_execute_task(workerid, task, 0));
 				/* Save the task */
 				STARPU_AYU_ADDTOTASKQUEUE(starpu_task_get_job_id(task), workerid);
-				_starpu_prio_deque_push_task(&worker->tasks_queue, task);
+				_starpu_prio_deque_push_front_task(&worker->tasks_queue, task);
 
 				/* Update general counter */
 				hp->nb_prefetched_tasks_per_arch_index[worker->arch_index] += 1;

+ 2 - 2
src/sched_policies/prio_deque.h

@@ -3,7 +3,7 @@
  * Copyright (C) 2013                                     Simon Archipoff
  * Copyright (C) 2013                                     Inria
  * Copyright (C) 2017                                     CNRS
- * Copyright (C) 2014,2017                                Université de Bordeaux
+ * Copyright (C) 2014,2017-2018                                Université de Bordeaux
  *
  * StarPU is free software; you can redistribute it and/or modify
  * it under the terms of the GNU Lesser General Public License as published by
@@ -59,7 +59,7 @@ static inline void _starpu_prio_deque_erase(struct _starpu_prio_deque *pdeque, s
 }
 
 /* push a task in O(lg(nb priorities)) */
-static inline int _starpu_prio_deque_push_task(struct _starpu_prio_deque *pdeque, struct starpu_task *task)
+static inline int _starpu_prio_deque_push_front_task(struct _starpu_prio_deque *pdeque, struct starpu_task *task)
 {
 	starpu_task_prio_list_push_front(&pdeque->list, task);
 	pdeque->ntasks++;

+ 2 - 2
src/sched_policies/work_stealing_policy.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2013,2015-2017                      Inria
- * Copyright (C) 2008-2017                                Université de Bordeaux
+ * Copyright (C) 2008-2018                                Université de Bordeaux
  * Copyright (C) 2010-2013,2015-2017                      CNRS
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -655,7 +655,7 @@ int ws_push_task(struct starpu_task *task)
 	starpu_sched_task_break(task);
 	record_data_locality(task, workerid);
 	STARPU_ASSERT_MSG(ws->per_worker[workerid].running, "workerid=%d, ws=%p\n", workerid, ws);
-	_starpu_prio_deque_push_task(&ws->per_worker[workerid].queue, task);
+	_starpu_prio_deque_push_front_task(&ws->per_worker[workerid].queue, task);
 	locality_pushed_task(ws, task, workerid, sched_ctx_id);
 
 	starpu_push_task_end(task);