|
@@ -466,9 +466,9 @@ int _starpu_repush_task(struct _starpu_job *j)
|
|
|
{
|
|
|
|
|
|
we consider the ctx empty */
|
|
|
- unsigned nworkers = _starpu_nworkers_able_to_execute_task(task, sched_ctx);
|
|
|
+ unsigned able = _starpu_workers_able_to_execute_task(task, sched_ctx);
|
|
|
|
|
|
- if(nworkers == 0)
|
|
|
+ if(!able)
|
|
|
{
|
|
|
_starpu_sched_ctx_lock_write(sched_ctx->id);
|
|
|
starpu_task_list_push_front(&sched_ctx->empty_ctx_tasks, task);
|
|
@@ -536,7 +536,6 @@ int _starpu_repush_task(struct _starpu_job *j)
|
|
|
int _starpu_push_task_to_workers(struct starpu_task *task)
|
|
|
{
|
|
|
struct _starpu_sched_ctx *sched_ctx = _starpu_get_sched_ctx_struct(task->sched_ctx);
|
|
|
- unsigned nworkers = 0;
|
|
|
|
|
|
_STARPU_TRACE_JOB_PUSH(task, task->priority > 0);
|
|
|
|
|
@@ -546,9 +545,9 @@ int _starpu_push_task_to_workers(struct starpu_task *task)
|
|
|
{
|
|
|
|
|
|
we consider the ctx empty */
|
|
|
- nworkers = _starpu_nworkers_able_to_execute_task(task, sched_ctx);
|
|
|
+ unsigned able = _starpu_workers_able_to_execute_task(task, sched_ctx);
|
|
|
|
|
|
- if (nworkers == 0)
|
|
|
+ if (!able)
|
|
|
{
|
|
|
_starpu_sched_ctx_lock_write(sched_ctx->id);
|
|
|
starpu_task_list_push_back(&sched_ctx->empty_ctx_tasks, task);
|
|
@@ -640,7 +639,7 @@ int _starpu_push_task_to_workers(struct starpu_task *task)
|
|
|
{
|
|
|
STARPU_ASSERT(sched_ctx->sched_policy->push_task);
|
|
|
|
|
|
- nworkers = starpu_sched_ctx_get_nworkers(sched_ctx->id);
|
|
|
+ unsigned nworkers = starpu_sched_ctx_get_nworkers(sched_ctx->id);
|
|
|
if (nworkers == 0)
|
|
|
ret = -1;
|
|
|
else
|