From: Berk Hess Date: Mon, 21 Oct 2013 14:05:20 +0000 (+0200) Subject: removed (harmless) left-over in nbnxn SIMD kernels X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=278e72b85d3302e80734d76d6a4d6a57ccd9b124;p=alexxy%2Fgromacs.git removed (harmless) left-over in nbnxn SIMD kernels 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 --- diff --git a/src/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre b/src/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre index 46dced1493..44865ab772 100644 --- a/src/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre +++ b/src/mdlib/nbnxn_kernels/nbnxn_kernel_file_generator/nbnxn_kernel_simd_template.c.pre @@ -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; diff --git a/src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c b/src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c index 8f0cfe8187..ca972eae32 100644 --- a/src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c +++ b/src/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.c @@ -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; diff --git a/src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c b/src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c index 191e7619a4..0a269ffa26 100644 --- a/src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c +++ b/src/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.c @@ -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;