Commit 13dbe2ab authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Only use one task type for the local and foreign spart sorts.

parent 632f3418
......@@ -3118,8 +3118,7 @@ void *runner_main(void *data) {
/* Reset the sort flags as our work here is done. */
t->flags = 0;
break;
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
/* Cleanup only if any of the indices went stale. */
runner_do_stars_sort(
r, ci, t->flags,
......
......@@ -1995,8 +1995,7 @@ void scheduler_reweight(struct scheduler *s, int verbose) {
(sizeof(int) * 8 - intrinsics_clz(t->ci->hydro.count));
break;
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
cost = wscale * intrinsics_popcount(t->flags) * scount_i *
(sizeof(int) * 8 - intrinsics_clz(t->ci->stars.count));
break;
......@@ -2280,8 +2279,7 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
case task_type_kick2:
case task_type_stars_ghost:
case task_type_logger:
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
case task_type_timestep:
qid = t->ci->super->owner;
break;
......
......@@ -81,8 +81,7 @@ const char *taskID_names[task_type_count] = {"none",
"stars_ghost_in",
"stars_ghost",
"stars_ghost_out",
"stars_sort_local",
"stars_sort_foreign"};
"stars_sort"};
/* Sub-task type names. */
const char *subtaskID_names[task_subtype_count] = {
......@@ -152,8 +151,7 @@ __attribute__((always_inline)) INLINE static enum task_actions task_acts_on(
return task_action_all;
case task_type_stars_ghost:
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
return task_action_spart;
break;
......@@ -355,8 +353,7 @@ void task_unlock(struct task *t) {
cell_gunlocktree(ci);
break;
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
cell_sunlocktree(ci);
break;
......@@ -479,8 +476,7 @@ int task_lock(struct task *t) {
if (cell_locktree(ci) != 0) return 0;
break;
case task_type_stars_sort_local:
case task_type_stars_sort_foreign:
case task_type_stars_sort:
if (ci->stars.hold) return 0;
if (cell_slocktree(ci) != 0) return 0;
break;
......
......@@ -69,11 +69,10 @@ enum task_types {
task_type_cooling,
task_type_star_formation,
task_type_logger,
task_type_stars_ghost_in,
task_type_stars_ghost_in, /* Implicit */
task_type_stars_ghost,
task_type_stars_ghost_out,
task_type_stars_sort_local,
task_type_stars_sort_foreign,
task_type_stars_ghost_out, /* Implicit */
task_type_stars_sort,
task_type_count
} __attribute__((packed));
......
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