(value: u64)
| 242 | #[must_use] |
| 243 | #[allow(clippy::cast_possible_truncation)] |
| 244 | pub const fn trailing_zeros_u64(value: u64) -> u32 { |
| 245 | #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] |
| 246 | { |
| 247 | value.trailing_zeros() |
| 248 | } |
| 249 | #[cfg(not(any(target_arch = "aarch64", target_arch = "x86_64")))] |
| 250 | { |
| 251 | let hi = (value >> 32) as u32; |
| 252 | let lo = value as u32; |
| 253 | let mask = Choice::from_u32_nz(lo).not().to_u32_mask(); |
| 254 | trailing_zeros_u32(lo).wrapping_add(mask & trailing_zeros_u32(hi)) |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | /// Fixed-stage binary search for the highest set bit, including the zero case. |
| 259 | #[cfg(any( |
nothing calls this directly
no test coverage detected