Commit 850b9a19 authored by James Willis's avatar James Willis
Browse files

Added statistics to runner_self1_vec to find the total number of interactions.

parent 61314f0f
......@@ -304,6 +304,8 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
int count_align;
int num_vec_proc = NUM_VEC_PROC;
int intCount = 0;
struct part *restrict parts = c->parts;
const int count = c->count;
......@@ -526,10 +528,14 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
VEC_HADD(curlvySum, pi->density.rot_v[1]);
VEC_HADD(curlvzSum, pi->density.rot_v[2]);
intCount += icount;
/* Reset interaction count. */
icount = 0;
} /* loop over all particles. */
message("Total number of self interactions: %d, average per particle: %f.", intCount, ((float)intCount) / ((float)count));
TIMER_TOC(timer_doself_density);
#endif /* WITH_VECTORIZATION */
}
......
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