From e3fd9385fd9da39954ac58e908721d8bf72f47fd Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Sun, 5 Aug 2018 22:19:54 +0200 Subject: [PATCH] Code formatting --- src/engine.c | 21 ++++++++++----------- src/space.c | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/engine.c b/src/engine.c index abcef2729e..b48d254607 100644 --- a/src/engine.c +++ b/src/engine.c @@ -3195,7 +3195,7 @@ void engine_maketasks(struct engine *e) { threadpool_map(&e->threadpool, engine_make_hydroloop_tasks_mapper, NULL, s->nr_cells, 1, 0, e); - if(e->verbose) + if (e->verbose) message("Making hydro tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3204,7 +3204,7 @@ void engine_maketasks(struct engine *e) { /* Add the self gravity tasks. */ if (e->policy & engine_policy_self_gravity) engine_make_self_gravity_tasks(e); - if(e->verbose) + if (e->verbose) message("Making gravity tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3250,11 +3250,10 @@ void engine_maketasks(struct engine *e) { /* Split the tasks. */ scheduler_splittasks(sched); - if(e->verbose) + if (e->verbose) message("Splitting tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); - #ifdef SWIFT_DEBUG_CHECKS /* Verify that we are not left with invalid tasks */ for (int i = 0; i < e->sched.nr_tasks; ++i) { @@ -3271,7 +3270,7 @@ void engine_maketasks(struct engine *e) { threadpool_map(&e->threadpool, engine_count_and_link_tasks_mapper, sched->tasks, sched->nr_tasks, sizeof(struct task), 0, e); - if(e->verbose) + if (e->verbose) message("Counting and linking tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3282,7 +3281,7 @@ void engine_maketasks(struct engine *e) { threadpool_map(&e->threadpool, cell_set_super_mapper, cells, nr_cells, sizeof(struct cell), 0, e); - if(e->verbose) + if (e->verbose) message("Setting super-pointers took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3299,7 +3298,7 @@ void engine_maketasks(struct engine *e) { threadpool_map(&e->threadpool, engine_make_extra_hydroloop_tasks_mapper, sched->tasks, sched->nr_tasks, sizeof(struct task), 0, e); - if(e->verbose) + if (e->verbose) message("Making extra hydroloop tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3309,7 +3308,7 @@ void engine_maketasks(struct engine *e) { if (e->policy & (engine_policy_self_gravity | engine_policy_external_gravity)) engine_link_gravity_tasks(e); - if(e->verbose) + if (e->verbose) message("Linking gravity tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3370,7 +3369,7 @@ void engine_maketasks(struct engine *e) { /* Set the unlocks per task. */ scheduler_set_unlocks(sched); - if(e->verbose) + if (e->verbose) message("Setting unlocks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3379,7 +3378,7 @@ void engine_maketasks(struct engine *e) { /* Rank the tasks. */ scheduler_ranktasks(sched); - if(e->verbose) + if (e->verbose) message("Ranking the tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); @@ -3388,7 +3387,7 @@ void engine_maketasks(struct engine *e) { /* Weight the tasks. */ scheduler_reweight(sched, e->verbose); - if(e->verbose) + if (e->verbose) message("Reweighting tasks took %.3f %s (including reweight).", clocks_from_ticks(getticks() - tic2), clocks_getunit()); diff --git a/src/space.c b/src/space.c index 5210ff68a7..6f98e788e9 100644 --- a/src/space.c +++ b/src/space.c @@ -1794,7 +1794,8 @@ void space_split_recursive(struct space *s, struct cell *c, /* Split or let it be? */ if ((with_gravity && gcount > space_splitsize) || - (!with_gravity && (count > space_splitsize || scount > space_splitsize))) { + (!with_gravity && + (count > space_splitsize || scount > space_splitsize))) { /* No longer just a leaf. */ c->split = 1; -- GitLab