Simplified uniform GPU selection in CMake
[alexxy/gromacs.git] / src / gromacs / mdlib / sim_util.cpp
index 1d61a68c59a3456ccfc2157437ff7d9abcb0fe55..d8fc0267f7a435d6aded8248996496ae5ae68db3 100644 (file)
@@ -1263,7 +1263,7 @@ void do_force(FILE*                               fplog,
         // For force buffer ops, we use the below conditon rather than
         // useGpuFBufferOps to ensure that init is performed even if this
         // NS step is also a virial step (on which f buf ops are deactivated).
-        if (simulationWork.useGpuBufferOps && simulationWork.useGpuNonbonded && (GMX_GPU == GMX_GPU_CUDA))
+        if (GMX_GPU_CUDA && simulationWork.useGpuBufferOps && simulationWork.useGpuNonbonded)
         {
             GMX_ASSERT(stateGpu, "stateGpu should be valid when buffer ops are offloaded");
             nbv->atomdata_init_add_nbat_f_to_f_gpu(stateGpu->fReducedOnDevice());