From 9d290b1b5a1222db6108f975bd2bec19e327f91f Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Wed, 29 Jun 2016 16:35:21 +0100 Subject: [PATCH] Style and formatting --- src/engine.c | 4 +--- src/hydro/Default/hydro_debug.h | 2 +- src/hydro/Minimal/hydro_debug.h | 2 +- src/runner.c | 2 -- src/tools.c | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/engine.c b/src/engine.c index bdfaa18134..e54c39b916 100644 --- a/src/engine.c +++ b/src/engine.c @@ -97,7 +97,6 @@ static cpu_set_t entry_affinity; * * @return The new #link pointer. */ - struct link *engine_addlink(struct engine *e, struct link *l, struct task *t) { const int ind = atomic_inc(&e->nr_links); @@ -1537,7 +1536,6 @@ void engine_maketasks(struct engine *e) { * * @return 1 if the space has to be rebuilt, 0 otherwise. */ - int engine_marktasks(struct engine *e) { struct scheduler *s = &e->sched; @@ -1756,7 +1754,6 @@ void engine_prepare(struct engine *e) { error("Failed to aggregate the rebuild flag across nodes."); rebuild = buff; #endif - e->tic_step = getticks(); /* Did this not go through? */ if (rebuild) { @@ -2107,6 +2104,7 @@ void engine_init_particles(struct engine *e) { engine_prepare(e); engine_marktasks(e); + /* Build the masks corresponding to the policy */ unsigned int mask = 0; unsigned int submask = 0; diff --git a/src/hydro/Default/hydro_debug.h b/src/hydro/Default/hydro_debug.h index 79ee392d46..9b8136e834 100644 --- a/src/hydro/Default/hydro_debug.h +++ b/src/hydro/Default/hydro_debug.h @@ -18,7 +18,7 @@ ******************************************************************************/ __attribute__((always_inline)) INLINE static void hydro_debug_particle( - struct part* p, struct xpart* xp) { + const struct part* p, const struct xpart* xp) { printf( "x=[%.3e,%.3e,%.3e], " "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e],\n " diff --git a/src/hydro/Minimal/hydro_debug.h b/src/hydro/Minimal/hydro_debug.h index 127ba75e99..1e0e3f1f11 100644 --- a/src/hydro/Minimal/hydro_debug.h +++ b/src/hydro/Minimal/hydro_debug.h @@ -18,7 +18,7 @@ ******************************************************************************/ __attribute__((always_inline)) INLINE static void hydro_debug_particle( - struct part* p, struct xpart* xp) { + const struct part* p, const struct xpart* xp) { printf( "x=[%.3e,%.3e,%.3e], " "v=[%.3e,%.3e,%.3e],v_full=[%.3e,%.3e,%.3e] \n a=[%.3e,%.3e,%.3e], " diff --git a/src/runner.c b/src/runner.c index c28b62edf1..53a80030ff 100644 --- a/src/runner.c +++ b/src/runner.c @@ -929,7 +929,6 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { ti_end_min = min(p->ti_end, ti_end_min); ti_end_max = max(p->ti_end, ti_end_max); } - } /* Otherwise, aggregate data from children. */ @@ -1009,7 +1008,6 @@ void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) { * * @param data A pointer to this thread's data. */ - void *runner_main(void *data) { struct runner *r = (struct runner *)data; diff --git a/src/tools.c b/src/tools.c index 3931775608..710efd7e4d 100644 --- a/src/tools.c +++ b/src/tools.c @@ -288,8 +288,8 @@ void self_all_density(struct runner *r, struct cell *ci) { } void pairs_single_grav(double *dim, long long int pid, - struct gpart *restrict gparts, - const struct part *parts, int N, int periodic) { + struct gpart *restrict gparts, const struct part *parts, + int N, int periodic) { int i, k; // int mj, mk; -- GitLab