From: Magnus Lundborg Date: Thu, 21 Oct 2021 20:14:50 +0000 (+0200) Subject: Avoid comparing Simd types to real 0 when making masks in NB FEP kernel. X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=5cc9f01e5d41044a628ffa2ac8b7992398fc5190 Avoid comparing Simd types to real 0 when making masks in NB FEP kernel. Refs #4230 --- diff --git a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp index 214e41a9d9..85f998cfc5 100644 --- a/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp +++ b/src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp @@ -864,12 +864,12 @@ static void nb_free_energy_kernel(const t_nblist& if constexpr (vdwInteractionTypeIsEwald) { computeVdwInteraction = - (r < rVdw && (c6[i] != 0 || c12[i] != 0) && bPairIncluded); + (r < rVdw && (c6[i] != zero || c12[i] != zero) && bPairIncluded); } else { computeVdwInteraction = - (rV < rVdw && (c6[i] != 0 || c12[i] != 0) && bPairIncluded); + (rV < rVdw && (c6[i] != zero || c12[i] != zero) && bPairIncluded); } if (gmx::anyTrue(computeVdwInteraction)) {