From 5cc9f01e5d41044a628ffa2ac8b7992398fc5190 Mon Sep 17 00:00:00 2001 From: Magnus Lundborg Date: Thu, 21 Oct 2021 22:14:50 +0200 Subject: [PATCH] Avoid comparing Simd types to real 0 when making masks in NB FEP kernel. Refs #4230 --- src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) { -- 2.22.0