Add dynamic pair-list pruning framework
[alexxy/gromacs.git] / src / gromacs / mdlib / nbnxn_kernels / nbnxn_kernel_cpu.cpp
index 4cdd8576c16a5500da9d183927b1319d1b74765f..cd9fbce337d01e7a751b5261745d7f333dfcdbfe 100644 (file)
@@ -97,10 +97,12 @@ static void clearGroupEnergies(nbnxn_atomdata_output_t *out)
  * \param[in,out] vCoulomb        Coulomb energy output buffer
  */
 template <int unrollj> static void
-reduceGroupEnergySimdBuffers(int numGroups, int numGroups_2log,
-                             const real *vVdwSimd, const real *vCoulombSimd,
-                             real * gmx_restrict vVdw,
-                             real * gmx_restrict vCoulomb)
+reduceGroupEnergySimdBuffers(int                       numGroups,
+                             int                       numGroups_2log,
+                             const real * gmx_restrict vVdwSimd,
+                             const real * gmx_restrict vCoulombSimd,
+                             real * gmx_restrict       vVdw,
+                             real * gmx_restrict       vCoulomb)
 {
     // cppcheck-suppress duplicateExpression
     const int unrollj_half     = unrollj/2;
@@ -220,6 +222,8 @@ nbnxn_kernel_cpu(nonbonded_verlet_group_t  *nbvg,
     int                nnbl = nbvg->nbl_lists.nnbl;
     nbnxn_pairlist_t **nbl  = nbvg->nbl_lists.nbl;
 
+    GMX_ASSERT(nbl[0]->nci >= 0, "nci<0, which signals an invalid pair-list");
+
     // cppcheck-suppress unreadVariable
     int gmx_unused nthreads = gmx_omp_nthreads_get(emntNonbonded);
 #pragma omp parallel for schedule(static) num_threads(nthreads)