Fix compiler warning and use static_assert
authorArtem Zhmurov <zhmurov@gmail.com>
Tue, 11 May 2021 05:34:06 +0000 (08:34 +0300)
committerArtem Zhmurov <zhmurov@gmail.com>
Tue, 11 May 2021 07:44:13 +0000 (07:44 +0000)
commitf199e283f9f923a1904a6d638f06cbf7b3c06b38
tree3e5f75c9a48f87f0cb801cd8ba29395b3ed2e01c
parent6d002ec667c955c5137acdad74663bdbc1712f2f
Fix compiler warning and use static_assert

1. The compiler assumes that GMX_GPU_CUDA and GMX_GPU_SYCL
   may be bit-fields and thus issue a warning if the logical
   or is used (constant-logical-operand). Casting them to
   booleans supresses the warning.
2. Change to use static_assert instead of the GMX_RELEASE_ASSERT
   because this code on a hot path.
src/gromacs/nbnxm/nbnxm_gpu_buffer_ops.cpp