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.
int numColumnsMax,
bool mustInsertNonLocalDependency)
{
- GMX_RELEASE_ASSERT(GMX_GPU_CUDA || GMX_GPU_SYCL,
- "nbnxn_gpu_x_to_nbat_x only supported with CUDA and SYCL");
+ static_assert((bool)GMX_GPU_CUDA || (bool)GMX_GPU_SYCL,
+ "nbnxn_gpu_x_to_nbat_x only supported with CUDA and SYCL");
GMX_ASSERT(nb, "Need a valid nbnxn_gpu object");
gmx::InteractionLocality interactionLoc = gmx::atomToInteractionLocality(locality);