Commit 4e1cd51e authored by James Willis's avatar James Willis
Browse files

Code formatting.

parent 97bbbc09
...@@ -106,17 +106,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_density( ...@@ -106,17 +106,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_density(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */ /* Update ngb counters */
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = pj->id; pi->ids_ngbs_density[pi->num_ngb_density] = pj->id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
if(pj->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pj->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pj->ids_ngbs_density[pj->num_ngb_density] = pi->id; pj->ids_ngbs_density[pj->num_ngb_density] = pi->id;
++pj->num_ngb_density; ++pj->num_ngb_density;
}
else ++pj->num_ngb_density;
#endif #endif
} }
...@@ -170,11 +166,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density( ...@@ -170,11 +166,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */ /* Update ngb counters */
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = pj->id; pi->ids_ngbs_density[pi->num_ngb_density] = pj->id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
#endif #endif
} }
...@@ -503,17 +497,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_force( ...@@ -503,17 +497,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */ /* Update ngb counters */
if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_force[pi->num_ngb_force] = pj->id; pi->ids_ngbs_force[pi->num_ngb_force] = pj->id;
++pi->num_ngb_force; ++pi->num_ngb_force;
}
else ++pi->num_ngb_force;
if(pj->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pj->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pj->ids_ngbs_force[pj->num_ngb_force] = pi->id; pj->ids_ngbs_force[pj->num_ngb_force] = pi->id;
++pj->num_ngb_force; ++pj->num_ngb_force;
}
else ++pj->num_ngb_force;
#endif #endif
} }
...@@ -608,11 +598,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force( ...@@ -608,11 +598,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
/* Update ngb counters */ /* Update ngb counters */
if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_force[pi->num_ngb_force] = pj->id; pi->ids_ngbs_force[pi->num_ngb_force] = pj->id;
++pi->num_ngb_force; ++pi->num_ngb_force;
}
else ++pi->num_ngb_force;
#endif #endif
} }
......
...@@ -669,19 +669,15 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec( ...@@ -669,19 +669,15 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (doi_mask & (1 << bit_index)) { if (doi_mask & (1 << bit_index)) {
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + bit_index].id; pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
} }
if (doi_mask2 & (1 << bit_index)) { if (doi_mask2 & (1 << bit_index)) {
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + VEC_SIZE + bit_index].id; pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + VEC_SIZE + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
} }
} }
#endif #endif
...@@ -897,19 +893,15 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec( ...@@ -897,19 +893,15 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (doi_mask & (1 << bit_index)) { if (doi_mask & (1 << bit_index)) {
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + bit_index].id; pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
} }
if (doi_mask2 & (1 << bit_index)) { if (doi_mask2 & (1 << bit_index)) {
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + VEC_SIZE + bit_index].id; pi->ids_ngbs_density[pi->num_ngb_density] = parts[pjd + VEC_SIZE + bit_index].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
} }
} }
#endif #endif
...@@ -1121,11 +1113,9 @@ __attribute__((always_inline)) INLINE void runner_doself2_force_vec( ...@@ -1121,11 +1113,9 @@ __attribute__((always_inline)) INLINE void runner_doself2_force_vec(
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) { if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) {
if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_force[pi->num_ngb_force] = parts[pjd + bit_index].id; pi->ids_ngbs_force[pi->num_ngb_force] = parts[pjd + bit_index].id;
++pi->num_ngb_force; ++pi->num_ngb_force;
}
else ++pi->num_ngb_force;
} }
} }
#endif #endif
...@@ -1373,11 +1363,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci, ...@@ -1373,11 +1363,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) { if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) {
if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_density[pi->num_ngb_density] = parts_j[sort_j[pjd + bit_index].i].id; pi->ids_ngbs_density[pi->num_ngb_density] = parts_j[sort_j[pjd + bit_index].i].id;
++pi->num_ngb_density; ++pi->num_ngb_density;
}
else ++pi->num_ngb_density;
} }
} }
#endif #endif
...@@ -1500,11 +1488,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci, ...@@ -1500,11 +1488,9 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (vec_is_mask_true(v_doj_mask) & (1 << bit_index)) { if (vec_is_mask_true(v_doj_mask) & (1 << bit_index)) {
if(pj->num_ngb_density < MAX_NUM_OF_NEIGHBOURS) { if(pj->num_ngb_density < MAX_NUM_OF_NEIGHBOURS)
pj->ids_ngbs_density[pj->num_ngb_density] = parts_i[sort_i[ci_cache_idx + first_pi + bit_index].i].id; pj->ids_ngbs_density[pj->num_ngb_density] = parts_i[sort_i[ci_cache_idx + first_pi + bit_index].i].id;
++pj->num_ngb_density; ++pj->num_ngb_density;
}
else ++pj->num_ngb_density;
} }
} }
#endif #endif
...@@ -1762,11 +1748,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci, ...@@ -1762,11 +1748,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) { if (vec_is_mask_true(v_doi_mask) & (1 << bit_index)) {
if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pi->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pi->ids_ngbs_force[pi->num_ngb_force] = parts_j[sort_j[pjd + bit_index].i].id; pi->ids_ngbs_force[pi->num_ngb_force] = parts_j[sort_j[pjd + bit_index].i].id;
++pi->num_ngb_force; ++pi->num_ngb_force;
}
else ++pi->num_ngb_force;
} }
} }
#endif #endif
...@@ -1899,11 +1883,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci, ...@@ -1899,11 +1883,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH #ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) { for (int bit_index = 0; bit_index < VEC_SIZE; bit_index++) {
if (vec_is_mask_true(v_doj_mask) & (1 << bit_index)) { if (vec_is_mask_true(v_doj_mask) & (1 << bit_index)) {
if(pj->num_ngb_force < MAX_NUM_OF_NEIGHBOURS) { if(pj->num_ngb_force < MAX_NUM_OF_NEIGHBOURS)
pj->ids_ngbs_force[pj->num_ngb_force] = parts_i[sort_i[ci_cache_idx + first_pi + bit_index].i].id; pj->ids_ngbs_force[pj->num_ngb_force] = parts_i[sort_i[ci_cache_idx + first_pi + bit_index].i].id;
++pj->num_ngb_force; ++pj->num_ngb_force;
}
else ++pj->num_ngb_force;
} }
} }
#endif #endif
......
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