From 04b79136dc439a86a1c735b1d0791eca6a143a1f Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Mon, 26 Aug 2019 10:22:18 +0200 Subject: [PATCH] Fix pairlist bug Introduced recently in 658819431c0dabd while fixing issues for upgrading clang-tidy version Change-Id: I4c0dd4212e93cccf11f2ce60fbb500923eb136e9 --- src/gromacs/nbnxm/pairlist.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gromacs/nbnxm/pairlist.cpp b/src/gromacs/nbnxm/pairlist.cpp index 715fd2c822..43ed81cd32 100644 --- a/src/gromacs/nbnxm/pairlist.cpp +++ b/src/gromacs/nbnxm/pairlist.cpp @@ -2707,11 +2707,11 @@ static void combine_nblists(gmx::ArrayRef nbls, int cj4_offset = ncj4; int excl_offset = nexcl; - for (const auto &nbl : nbls) + for (gmx::index i = n; i < nbls.ssize(); i++) { - sci_offset -= nbl.sci.size(); - cj4_offset -= nbl.cj4.size(); - excl_offset -= nbl.excl.size(); + sci_offset -= nbls[i].sci.size(); + cj4_offset -= nbls[i].cj4.size(); + excl_offset -= nbls[i].excl.size(); } const NbnxnPairlistGpu &nbli = nbls[n]; -- 2.11.4.GIT