diff --git a/src/engine.c b/src/engine.c index 6e3556f5ce6032047ffd8d08302ef5599b7f179c..4c9fce2f43323f91c4f58fb3440b794a972cfec2 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1828,10 +1828,10 @@ void engine_exchange_proxy_multipoles(struct engine *e) { * * @param e The #engine. */ -void engine_print_task_counts(struct engine *e) { +void engine_print_task_counts(const struct engine *e) { const ticks tic = getticks(); - struct scheduler *const sched = &e->sched; + const struct scheduler *sched = &e->sched; const int nr_tasks = sched->nr_tasks; const struct task *const tasks = sched->tasks; @@ -1878,7 +1878,7 @@ void engine_print_task_counts(struct engine *e) { * * @return the estimated total number of tasks */ -int engine_estimate_nr_tasks(struct engine *e) { +int engine_estimate_nr_tasks(const struct engine *e) { int tasks_per_cell = e->tasks_per_cell; if (tasks_per_cell > 0) return e->s->tot_cells * tasks_per_cell; @@ -1887,8 +1887,7 @@ int engine_estimate_nr_tasks(struct engine *e) { * basically use a formula <n1>*ntopcells + <n2>*(totcells - ntopcells). * Where <n1> is the expected maximum tasks per top-level/super cell, and * <n2> the expected maximum tasks for all other cells. These should give - * a safe upper limit. - */ + * a safe upper limit. */ int n1 = 0; int n2 = 0; if (e->policy & engine_policy_hydro) { diff --git a/src/engine.h b/src/engine.h index 0d649e6e531ed39994c4e0ef90b92d6e758a2ecc..db4a67d8209295f9bbd230cd989a49ad35fc5ca4 100644 --- a/src/engine.h +++ b/src/engine.h @@ -444,7 +444,7 @@ int engine_is_done(struct engine *e); void engine_pin(void); void engine_unpin(void); void engine_clean(struct engine *e); -int engine_estimate_nr_tasks(struct engine *e); +int engine_estimate_nr_tasks(const struct engine *e); /* Function prototypes, engine_maketasks.c. */ void engine_maketasks(struct engine *e);