Add simd reduction pragma to vectorize innermost loop on half-neighbor variant

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2022-03-21 17:02:09 +01:00
parent 719330807b
commit 2a555a7deb

View File

@ -136,6 +136,8 @@ double computeForceLJHalfNeigh(Parameter *param, Atom *atom, Neighbor *neighbor,
const int type_i = atom->type[i];
#endif
// Pragma required to vectorize the inner loop
#pragma simd reduction(+: fix,fiy,fiz)
for(int k = 0; k < numneighs; k++) {
int j = neighs[k];
MD_FLOAT delx = xtmp - atom_x(j);