removed (harmless) left-over in nbnxn SIMD kernels
authorBerk Hess <hess@kth.se>
Mon, 21 Oct 2013 14:05:20 +0000 (16:05 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 5 Nov 2013 15:10:48 +0000 (16:10 +0100)
This improves performance of PME + p-coupling by about 5%.
With Ewald and virial, the nbnxn SIMD energy kernels were used
(some left-over development code). The plain-C code did not do this.

Change-Id: I039044fcb393bf0bcaa06f38498b2a57d60cf080

src/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre
src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c
src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c

index 46dced149350655002b7200a3e79b77f15c57fe2..44865ab772c96939d91912afc767efab110b1f2c 100644 (file)
@@ -154,12 +154,7 @@ void
             }}
         }}
 
-        /* With Ewald type electrostatics we the forces for excluded atom pairs
-         * should not contribute to the virial sum. The exclusion forces
-         * are not calculate in the energy kernels, but are in _noener.
-         */
-        if (!((force_flags & GMX_FORCE_ENERGY) ||
-              (EEL_FULL(ic->eeltype) && (force_flags & GMX_FORCE_VIRIAL))))
+        if (!(force_flags & GMX_FORCE_ENERGY))
         {{
             /* Don't calculate energies */
             p_nbk_noener[coult][nbat->comb_rule](nbl[nb], nbat,
@@ -168,7 +163,7 @@ void
                                                  out->f,
                                                  fshift_p);
         }}
-        else if (out->nV == 1 || !(force_flags & GMX_FORCE_ENERGY))
+        else if (out->nV == 1)
         {{
             /* No energy groups */
             out->Vvdw[0] = 0;
index 8f0cfe81874f37182a7e1d5781f0e0e987f46f3a..ca972eae32395308b638a7b716960f330bc0a4c1 100644 (file)
@@ -278,12 +278,7 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t       *nbl_list,
             }
         }
 
-        /* With Ewald type electrostatics we the forces for excluded atom pairs
-         * should not contribute to the virial sum. The exclusion forces
-         * are not calculate in the energy kernels, but are in _noener.
-         */
-        if (!((force_flags & GMX_FORCE_ENERGY) ||
-              (EEL_FULL(ic->eeltype) && (force_flags & GMX_FORCE_VIRIAL))))
+        if (!(force_flags & GMX_FORCE_ENERGY))
         {
             /* Don't calculate energies */
             p_nbk_noener[coult][nbat->comb_rule](nbl[nb], nbat,
@@ -292,7 +287,7 @@ nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t       *nbl_list,
                                                  out->f,
                                                  fshift_p);
         }
-        else if (out->nV == 1 || !(force_flags & GMX_FORCE_ENERGY))
+        else if (out->nV == 1)
         {
             /* No energy groups */
             out->Vvdw[0] = 0;
index 191e7619a41e3499f2f6add58a599aceea327b48..0a269ffa268ab2d199e8518f00b26d347fb826b3 100644 (file)
@@ -280,12 +280,7 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t       *nbl_list,
             }
         }
 
-        /* With Ewald type electrostatics we the forces for excluded atom pairs
-         * should not contribute to the virial sum. The exclusion forces
-         * are not calculate in the energy kernels, but are in _noener.
-         */
-        if (!((force_flags & GMX_FORCE_ENERGY) ||
-              (EEL_FULL(ic->eeltype) && (force_flags & GMX_FORCE_VIRIAL))))
+        if (!(force_flags & GMX_FORCE_ENERGY))
         {
             /* Don't calculate energies */
             p_nbk_noener[coult][nbat->comb_rule](nbl[nb], nbat,
@@ -294,7 +289,7 @@ nbnxn_kernel_simd_4xn(nbnxn_pairlist_set_t       *nbl_list,
                                                  out->f,
                                                  fshift_p);
         }
-        else if (out->nV == 1 || !(force_flags & GMX_FORCE_ENERGY))
+        else if (out->nV == 1)
         {
             /* No energy groups */
             out->Vvdw[0] = 0;