diff --git a/crates/cuda_std/src/warp.rs b/crates/cuda_std/src/warp.rs index 6f3e13ab..409aa0e0 100644 --- a/crates/cuda_std/src/warp.rs +++ b/crates/cuda_std/src/warp.rs @@ -766,7 +766,7 @@ unsafe fn warp_shuffle_32( } assert!( - !(width & (width - 1)) != 0 && width <= 32, + width != 0 && (width & (width - 1)) == 0 && width <= 32, "width must be a power of 2 and less than or equal to 32" );