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(
#ifdef DEBUG_INTERACTIONS_SPH
/* 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->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->num_ngb_density;
}
else ++pj->num_ngb_density;
#endif
}
......@@ -170,11 +166,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_density(
#ifdef DEBUG_INTERACTIONS_SPH
/* 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->num_ngb_density;
}
else ++pi->num_ngb_density;
#endif
}
......@@ -503,17 +497,13 @@ __attribute__((always_inline)) INLINE static void runner_iact_force(
#ifdef DEBUG_INTERACTIONS_SPH
/* 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->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->num_ngb_force;
}
else ++pj->num_ngb_force;
#endif
}
......@@ -608,11 +598,9 @@ __attribute__((always_inline)) INLINE static void runner_iact_nonsym_force(
#ifdef DEBUG_INTERACTIONS_SPH
/* 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->num_ngb_force;
}
else ++pi->num_ngb_force;
#endif
}
......
......@@ -669,20 +669,16 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_density;
}
else ++pi->num_ngb_density;
}
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->num_ngb_density;
}
else ++pi->num_ngb_density;
}
}
#endif
......@@ -897,20 +893,16 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_density;
}
else ++pi->num_ngb_density;
}
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->num_ngb_density;
}
else ++pi->num_ngb_density;
}
}
#endif
......@@ -1121,12 +1113,10 @@ __attribute__((always_inline)) INLINE void runner_doself2_force_vec(
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_force;
}
else ++pi->num_ngb_force;
}
}
#endif
......@@ -1373,12 +1363,10 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_density;
}
else ++pi->num_ngb_density;
}
}
#endif
......@@ -1500,12 +1488,10 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_density;
}
else ++pj->num_ngb_density;
}
}
#endif
......@@ -1762,12 +1748,10 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_force;
}
else ++pi->num_ngb_force;
}
}
#endif
......@@ -1899,12 +1883,10 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
#ifdef DEBUG_INTERACTIONS_SPH
for (int bit_index = 0; bit_index < VEC_SIZE; 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->num_ngb_force;
}
else ++pj->num_ngb_force;
}
}
#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