Commit 8676a94f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add some constant pointers to help the compiler.

parent c2473f44
......@@ -2651,8 +2651,8 @@ INLINE static void gravity_L2P(const struct grav_tensor *lb,
* @param dim The dimensions of the box.
*/
__attribute__((always_inline)) INLINE static int
gravity_multipole_accept_rebuild(const struct gravity_tensors *ma,
const struct gravity_tensors *mb,
gravity_multipole_accept_rebuild(const struct gravity_tensors *const ma,
const struct gravity_tensors *const mb,
double theta_crit_inv, int periodic,
const double dim[3]) {
......@@ -2692,8 +2692,9 @@ gravity_multipole_accept_rebuild(const struct gravity_tensors *ma,
* @param dim The dimensions of the box.
*/
__attribute__((always_inline)) INLINE static int gravity_multipole_accept(
const struct gravity_tensors *ma, const struct gravity_tensors *mb,
double theta_crit_inv, int periodic, const double dim[3]) {
const struct gravity_tensors *const ma,
const struct gravity_tensors *const mb, double theta_crit_inv, int periodic,
const double dim[3]) {
const double r_crit_a = ma->r_max * theta_crit_inv;
const double r_crit_b = mb->r_max * theta_crit_inv;
......
......@@ -666,7 +666,7 @@ void runner_do_grav_long_range(struct runner *r, struct cell *ci, int timer) {
const double theta_crit_inv = props->theta_crit_inv;
const double max_distance = props->a_smooth * props->r_cut * cell_width;
const double max_distance2 = max_distance * max_distance;
struct gravity_tensors *mi = ci->multipole;
struct gravity_tensors *const mi = ci->multipole;
const double CoM[3] = {mi->CoM[0], mi->CoM[1], mi->CoM[2]};
TIMER_TIC;
......
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