Fix -Wsizeof-array-div on gcc 11.
Fix -Wsizeof-array-div on gcc 11.

The compiler suggests putting parentheses around the division to
suppress the warning, but this isn't working on gcc 11. Refactoring
this out a bit works though.

NVIDIA/cub,NVlabs/cub,NVlabs/CUB