Skip to content
Snippets Groups Projects

[WIP] Speed-up cell_unskip_tasks

Closed Pedro Gonnet requested to merge task_activation into master
+ 4
4
@@ -1421,6 +1421,9 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
struct scheduler *s) {
const struct engine *e = s->space->e;
/* Quit early? */
if (!cell_is_active(ci, e) && (cj == NULL || !cell_is_active(cj, e))) return;
/* Store the current dx_max and h_max values. */
ci->dx_max_old = ci->dx_max_part;
ci->h_max_old = ci->h_max;
@@ -1431,9 +1434,6 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
/* Self interaction? */
if (cj == NULL) {
/* Do anything? */
if (!cell_is_active(ci, e)) return;
/* Recurse? */
if (cell_can_recurse_in_self_task(ci)) {
@@ -1660,7 +1660,7 @@ void cell_activate_subcell_tasks(struct cell *ci, struct cell *cj,
}
/* Otherwise, activate the sorts and drifts. */
else if (cell_is_active(ci, e) || cell_is_active(cj, e)) {
else {
/* Get the type of pair if not specified explicitly. */
double shift[3];
Loading