|
|
|
@ -117,12 +117,12 @@ GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline constexpr uint32_t BitCount( |
|
|
|
|
#if GRPC_HAS_BUILTIN(__builtin_ctz) |
|
|
|
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline constexpr uint32_t |
|
|
|
|
CountTrailingZeros(uint32_t i) { |
|
|
|
|
DCHECK_NE(i, 0); // __builtin_ctz returns undefined behavior for 0
|
|
|
|
|
DCHECK_NE(i, 0u); // __builtin_ctz returns undefined behavior for 0
|
|
|
|
|
return __builtin_ctz(i); |
|
|
|
|
} |
|
|
|
|
GPR_ATTRIBUTE_ALWAYS_INLINE_FUNCTION inline constexpr uint32_t |
|
|
|
|
CountTrailingZeros(uint64_t i) { |
|
|
|
|
DCHECK_NE(i, 0); // __builtin_ctz returns undefined behavior for 0
|
|
|
|
|
DCHECK_NE(i, 0u); // __builtin_ctz returns undefined behavior for 0
|
|
|
|
|
return __builtin_ctzll(i); |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
|