MCPcopy Create free account
hub / github.com/NVIDIA/cutlass / has_single_bit

Function has_single_bit

include/cute/numeric/math.hpp:127–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125// Checks if a number is an integral power of two
126template <class T>
127CUTE_HOST_DEVICE constexpr
128bool
129has_single_bit(T x) {
130 return x != 0 && (x & (x - 1)) == 0;
131}
132
133// Smallest number of bits needed to represent the given value
134// For x == 0, this is 0

Callers 7

upcastFunction · 0.85
downcastFunction · 0.85
safe_divFunction · 0.85
upcastFunction · 0.85
downcastFunction · 0.85
to_mixed_bitsFunction · 0.85
is_byte_alignedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected