From e421b4ad103c44e5c66f6aac989157e6c5588d3d Mon Sep 17 00:00:00 2001 From: Andrey Alekseenko Date: Fri, 29 Oct 2021 16:10:14 +0200 Subject: [PATCH] Silence clang-tidy warnings --- src/gromacs/mdlib/update_constrain_gpu_impl.cpp | 2 +- src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gromacs/mdlib/update_constrain_gpu_impl.cpp b/src/gromacs/mdlib/update_constrain_gpu_impl.cpp index f0cf01c65d..601a740e05 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 = bool(GMX_GPU_CUDA) || bool(GMX_GPU_SYCL); +static constexpr bool sc_haveGpuConstraintSupport = (GMX_GPU_CUDA != 0) || (GMX_GPU_SYCL != 0); 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 4e3126efba..84f26a198c 100644 --- a/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp +++ b/src/gromacs/mdtypes/state_propagator_data_gpu_impl_gpu.cpp @@ -172,7 +172,8 @@ 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 ((bool(GMX_GPU_CUDA) || bool(GMX_GPU_SYCL)) && d_fCapacity_ != d_fOldCapacity) + static constexpr bool sc_haveGpuFBufferOps = ((GMX_GPU_CUDA != 0) || (GMX_GPU_SYCL != 0)); + if (sc_haveGpuFBufferOps && d_fCapacity_ != d_fOldCapacity) { clearDeviceBufferAsync(&d_f_, 0, d_fCapacity_, *localStream_); } -- 2.22.0