Commit b54187ab authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent 277ad93c
...@@ -422,15 +422,14 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache( ...@@ -422,15 +422,14 @@ __attribute__((always_inline)) INLINE static void populate_max_index_no_cache(
* @param active_cj Is any particle in cell cj active? * @param active_cj Is any particle in cell cj active?
*/ */
__attribute__((always_inline)) INLINE static void __attribute__((always_inline)) INLINE static void
populate_max_index_no_cache_force(const struct cell *ci, const struct cell *cj, populate_max_index_no_cache_force(
const struct entry *restrict sort_i, const struct cell *ci, const struct cell *cj,
const struct entry *restrict sort_j, const struct entry *restrict sort_i, const struct entry *restrict sort_j,
const float dx_max, const float rshift, const float dx_max, const float rshift, const double hi_max_raw,
const double hi_max_raw, const double hj_max_raw, const double h_max, const double di_max,
const double hj_max_raw, const double h_max, const double dj_min, int *max_index_i, int *max_index_j, int *init_pi,
const double di_max, const double dj_min, int *max_index_i, int *init_pj, const timebin_t max_active_bin, const int active_ci,
int *max_index_j, int *init_pi, int *init_pj, const int active_cj) {
const timebin_t max_active_bin, const int active_ci, const int active_cj) {
const struct part *restrict parts_i = ci->parts; const struct part *restrict parts_i = ci->parts;
const struct part *restrict parts_j = cj->parts; const struct part *restrict parts_j = cj->parts;
...@@ -445,8 +444,7 @@ populate_max_index_no_cache_force(const struct cell *ci, const struct cell *cj, ...@@ -445,8 +444,7 @@ populate_max_index_no_cache_force(const struct cell *ci, const struct cell *cj,
* particle in cell j. */ * particle in cell j. */
first_pi = ci->count; first_pi = ci->count;
active_id = first_pi - 1; active_id = first_pi - 1;
while (first_pi > 0 && while (first_pi > 0 && sort_i[first_pi - 1].d + dx_max + h_max > dj_min) {
sort_i[first_pi - 1].d + dx_max + h_max > dj_min) {
first_pi--; first_pi--;
/* Store the index of the particle if it is active. */ /* Store the index of the particle if it is active. */
if (part_is_active_no_debug(&parts_i[sort_i[first_pi].i], max_active_bin)) if (part_is_active_no_debug(&parts_i[sort_i[first_pi].i], max_active_bin))
...@@ -1692,10 +1690,10 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci, ...@@ -1692,10 +1690,10 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
/* Find particles maximum distance into cj, max_di[] and ci, max_dj[]. */ /* Find particles maximum distance into cj, max_di[] and ci, max_dj[]. */
/* Also find the first pi that interacts with any particle in cj and the last /* Also find the first pi that interacts with any particle in cj and the last
* pj that interacts with any particle in ci. */ * pj that interacts with any particle in ci. */
populate_max_index_no_cache_force(ci, cj, sort_i, sort_j, dx_max, rshift, populate_max_index_no_cache_force(
hi_max_raw, hj_max_raw, h_max, ci, cj, sort_i, sort_j, dx_max, rshift, hi_max_raw, hj_max_raw, h_max,
di_max, dj_min, max_index_i, max_index_j, di_max, dj_min, max_index_i, max_index_j, &first_pi, &last_pj,
&first_pi, &last_pj, max_active_bin, active_ci, active_cj); max_active_bin, active_ci, active_cj);
/* Limits of the outer loops. */ /* Limits of the outer loops. */
const int first_pi_loop = first_pi; const int first_pi_loop = first_pi;
......
...@@ -186,7 +186,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h, ...@@ -186,7 +186,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell->ti_old_part = 8; cell->ti_old_part = 8;
cell->ti_hydro_end_min = 8; cell->ti_hydro_end_min = 8;
cell->ti_hydro_end_max = 8; cell->ti_hydro_end_max = 8;
cell->nodeID = NODE_ID; cell->nodeID = NODE_ID;
shuffle_particles(cell->parts, cell->count); shuffle_particles(cell->parts, cell->count);
......
...@@ -145,7 +145,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h, ...@@ -145,7 +145,7 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
cell->ti_old_part = 8; cell->ti_old_part = 8;
cell->ti_hydro_end_min = 8; cell->ti_hydro_end_min = 8;
cell->ti_hydro_end_max = 10; cell->ti_hydro_end_max = 10;
cell->nodeID = NODE_ID; cell->nodeID = NODE_ID;
shuffle_particles(cell->parts, cell->count); shuffle_particles(cell->parts, cell->count);
......
Markdown is supported
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