Simplified uniform GPU selection in CMake
[alexxy/gromacs.git] / src / gromacs / ewald / pme_gpu.cpp
index bcac411467a5dca9f9be50875c3890ca6fb7556f..19215fa90fff848956a4cd0e8c562f43a54bf65b 100644 (file)
@@ -195,7 +195,7 @@ void pme_gpu_launch_spread(gmx_pme_t*            pme,
                            const real            lambdaQ)
 {
     GMX_ASSERT(pme_gpu_active(pme), "This should be a GPU run of PME but it is not enabled.");
-    GMX_ASSERT(xReadyOnDevice || !pme->bPPnode || (GMX_GPU != GMX_GPU_CUDA),
+    GMX_ASSERT(!GMX_GPU_CUDA || xReadyOnDevice || !pme->bPPnode,
                "Need a valid xReadyOnDevice on PP+PME ranks with CUDA.");
     GMX_ASSERT(pme->doCoulomb, "Only Coulomb PME can be run on GPU.");
 
@@ -344,7 +344,8 @@ bool pme_gpu_try_finish_task(gmx_pme_t*               pme,
     // time needed for that checking, but do not yet record that the
     // gather has occured.
     bool           needToSynchronize      = true;
-    constexpr bool c_streamQuerySupported = (GMX_GPU == GMX_GPU_CUDA);
+    constexpr bool c_streamQuerySupported = bool(GMX_GPU_CUDA);
+
     // TODO: implement c_streamQuerySupported with an additional GpuEventSynchronizer per stream (#2521)
     if ((completionKind == GpuTaskCompletion::Check) && c_streamQuerySupported)
     {