Skip to content
Snippets Groups Projects
Commit 4d345471 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

replace all this 'super' sillines and just store the previous task.

parent 3a405f36
No related branches found
No related tags found
2 merge requests!136Master,!75Overlapping tasks
......@@ -1177,7 +1177,7 @@ void *runner_main(void *data) {
struct engine *e = r->e;
struct scheduler *sched = &e->sched;
struct task *t = NULL;
struct cell *ci, *cj, *super;
struct cell *ci, *cj;
struct part *parts;
int k, nr_parts;
......@@ -1187,8 +1187,8 @@ void *runner_main(void *data) {
/* Wait at the barrier. */
engine_barrier(e, r->id);
/* Re-set the pointer to the previous super cell. */
super = NULL;
/* Re-set the pointer to the previous task, as there is none. */
struct task* prev = NULL;
/* Loop while there are tasks... */
while (1) {
......@@ -1198,7 +1198,7 @@ void *runner_main(void *data) {
/* Get the task. */
TIMER_TIC
t = scheduler_gettask(sched, r->qid, super);
t = scheduler_gettask(sched, r->qid, prev);
TIMER_TOC(timer_gettask);
/* Did I get anything? */
......@@ -1210,14 +1210,6 @@ void *runner_main(void *data) {
cj = t->cj;
t->rid = r->cpuid;
/* Set super to the first cell that I own. */
if (t->type != task_type_rewait && t->type != task_type_psort) {
if (ci->super != NULL && ci->super->owner == r->qid)
super = ci->super;
else if (cj != NULL && cj->super != NULL && cj->super->owner == r->qid)
super = cj->super;
}
/* Different types of tasks... */
switch (t->type) {
case task_type_self:
......@@ -1302,6 +1294,7 @@ void *runner_main(void *data) {
}
/* We're done with this task, see if we get a next one. */
prev = t;
t = scheduler_done(sched, t);
} /* main loop. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment