Commit ace81ea0 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Simplify the logic in engine_count_and_link_tasks_mapper() by adding an 'else...

Simplify the logic in engine_count_and_link_tasks_mapper() by adding an 'else if' where there should have been one a long time ago.
parent d198e085
......@@ -1493,22 +1493,21 @@ void engine_count_and_link_tasks_mapper(void *map_data, int num_elements,
/* Link sort tasks to all the higher sort task. */
if (t_type == task_type_sort) {
for (struct cell *finger = t->ci->parent; finger != NULL;
finger = finger->parent)
finger = finger->parent) {
if (finger->hydro.sorts != NULL)
scheduler_addunlock(sched, t, finger->hydro.sorts);
}
}
/* Link stars sort tasks to all the higher sort task. */
if (t_type == task_type_stars_sort) {
/* Link stars sort tasks to all the higher sort task. */
} else if (t_type == task_type_stars_sort) {
for (struct cell *finger = t->ci->parent; finger != NULL;
finger = finger->parent) {
if (finger->stars.sorts != NULL)
scheduler_addunlock(sched, t, finger->stars.sorts);
}
}
/* Link self tasks to cells. */
else if (t_type == task_type_self) {
/* Link self tasks to cells. */
} else if (t_type == task_type_self) {
atomic_inc(&ci->nr_tasks);
if (t_subtype == task_subtype_density) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment