diff --git a/src/runner.c b/src/runner.c index 3dc51861aaa78ae8bd86505f0a517fe47878442f..518587519769087672ba14e31bceacd66ea44bcd 100644 --- a/src/runner.c +++ b/src/runner.c @@ -787,12 +787,21 @@ void runner_do_ghost(struct runner *r, struct cell *c, int timer) { /* Left or right? */ if (l->t->ci == finger) +#ifdef WITH_VECTORIZATION + runner_dopair_subset_density_vec(r, finger, parts, pid, count, + l->t->cj); +#else runner_dopair_subset_density(r, finger, parts, pid, count, l->t->cj); +#endif else +#ifdef WITH_VECTORIZATION + runner_dopair_subset_density_vec(r, finger, parts, pid, count, + l->t->ci); +#else runner_dopair_subset_density(r, finger, parts, pid, count, l->t->ci); - +#endif } /* Otherwise, sub-self interaction? */ diff --git a/src/runner_doiact.h b/src/runner_doiact.h index 7910502cd251d90e3fa72c6539a07c3f62ae794f..d72f4d27896e63418f2b246346802b1f843892ad 100644 --- a/src/runner_doiact.h +++ b/src/runner_doiact.h @@ -603,9 +603,11 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, const double di = hi * kernel_gamma + dxj + pix * runner_shift[sid][0] + piy * runner_shift[sid][1] + piz * runner_shift[sid][2]; +// int ctr = 0; /* Loop over the parts in cj. */ for (int pjd = 0; pjd < count_j && sort_j[pjd].d < di; pjd++) { +// ctr++; /* Get a pointer to the jth particle. */ struct part *restrict pj = &parts_j[sort_j[pjd].i]; const float hj = pj->h; @@ -631,6 +633,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci, IACT_NONSYM(r2, dx, hi, hj, pi, pj); } } /* loop over the parts in cj. */ +// message("pi: %lld, iterations in inner loop: %d", pi->id, ctr); } /* loop over the parts in ci. */ } @@ -2950,7 +2953,11 @@ void DOSUB_SUBSET(struct runner *r, struct cell *ci, struct part *parts, /* Do any of the cells need to be drifted first? */ if (!cell_are_part_drifted(cj, e)) error("Cell should be drifted!"); +#ifdef WITH_VECTORIZATION + runner_dopair_subset_density_vec(r, ci, parts, ind, count, cj); +#else DOPAIR_SUBSET(r, ci, parts, ind, count, cj); +#endif } } /* otherwise, pair interaction. */