Browse Source

src/core/task.c: use existing function instead of duplicating its code

Nathalie Furmento 14 years ago
parent
commit
eee3e0554e
1 changed files with 1 additions and 10 deletions
  1. 1 10
      src/core/task.c

+ 1 - 10
src/core/task.c

@@ -236,16 +236,7 @@ int starpu_task_submit(struct starpu_task *task)
 	/* internally, StarPU manipulates a starpu_job_t which is a wrapper around a
 	* task structure, it is possible that this job structure was already
 	* allocated, for instance to enforce task depenencies. */
-	starpu_job_t j;
-
-	if (!task->starpu_private)
-	{
-		j = _starpu_job_create(task);
-		task->starpu_private = j;
-	}
-	else {
-		j = (struct starpu_job_s *)task->starpu_private;
-	}
+	starpu_job_t j = _starpu_get_job_associated_to_task(task);
 
 	ret = _starpu_submit_job(j, 0);