Avoid comparing Simd types to real 0 when making masks in NB FEP kernel.
authorMagnus Lundborg <magnus.lundborg@scilifelab.se>
Thu, 21 Oct 2021 20:14:50 +0000 (22:14 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 22 Oct 2021 05:31:05 +0000 (05:31 +0000)
Refs #4230

src/gromacs/gmxlib/nonbonded/nb_free_energy.cpp

index 214e41a9d93de0b01c29b8a0db279bbb4b6e5e79..85f998cfc546412a2fafffbac2623f846656fe4a 100644 (file)
@@ -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))
                         {