From: Andrey Alekseenko Date: Sat, 23 Oct 2021 11:20:34 +0000 (+0200) Subject: Silence Clang's constant-logical-operand warning X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?p=alexxy%2Fgromacs.git;a=commitdiff_plain;h=783717c361c16bdb708b79afb75a6cdd0f4e613a Silence Clang's constant-logical-operand warning --- diff --git a/src/gromacs/mdlib/update_constrain_gpu_impl.cpp b/src/gromacs/mdlib/update_constrain_gpu_impl.cpp index 9b8d102d25..f0cf01c65d 100644 --- a/src/gromacs/mdlib/update_constrain_gpu_impl.cpp +++ b/src/gromacs/mdlib/update_constrain_gpu_impl.cpp @@ -68,7 +68,7 @@ #include "gromacs/timing/wallcycle.h" #include "gromacs/topology/mtop_util.h" -static constexpr bool sc_haveGpuConstraintSupport = GMX_GPU_CUDA || GMX_GPU_SYCL; +static constexpr bool sc_haveGpuConstraintSupport = bool(GMX_GPU_CUDA) || bool(GMX_GPU_SYCL); namespace gmx { diff --git a/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp b/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp index c08c8f5900..9bac56b216 100644 --- a/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp +++ b/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp @@ -173,7 +173,7 @@ void StatePropagatorDataGpu::Impl::reinit(int numAtomsLocal, int numAtomsAll) // Clearing of the forces can be done in local stream since the nonlocal stream cannot reach // the force accumulation stage before syncing with the local stream. Only done in CUDA and // SYCL, since the force buffer ops are not implemented in OpenCL. - if ((GMX_GPU_CUDA || GMX_GPU_SYCL) && d_fCapacity_ != d_fOldCapacity) + if ((bool(GMX_GPU_CUDA) || bool(GMX_GPU_SYCL)) && d_fCapacity_ != d_fOldCapacity) { clearDeviceBufferAsync(&d_f_, 0, d_fCapacity_, *localStream_); } @@ -334,7 +334,7 @@ void StatePropagatorDataGpu::Impl::copyCoordinatesToGpu(const gmx::ArrayRef