Returns true if the argument is a power of 2
| 79 | |
| 80 | /// Returns true if the argument is a power of 2 |
| 81 | CUTLASS_HOST_DEVICE |
| 82 | constexpr bool ispow2(unsigned x) { |
| 83 | return x && (!(x & (x - 1))); |
| 84 | } |
| 85 | |
| 86 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 87 |
no outgoing calls
no test coverage detected