Home
last modified time | relevance | path

Searched refs:is_power_of_two (Results 1 – 6 of 6) sorted by relevance

/linux/rust/kernel/
H A Dptr.rs53 ALIGN.is_power_of_two(), in new()
79 if align.is_power_of_two() { in new_checked()
130 if !self.0.is_power_of_two() { in as_nonzero()
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00reg.h168 #define is_power_of_two(x) ( !((x) & ((x)-1)) ) macro
170 #define is_valid_mask(x) is_power_of_two(1LU + (x) + low_bit_mask(x))
/linux/rust/zerocopy/src/util/
H A Dmod.rs147 kani::requires(align.is_power_of_two()),
228 kani::requires(align.is_power_of_two()),
249 debug_assert!(align.is_power_of_two()); in round_down_to_next_multiple_of_alignment()
/linux/rust/zerocopy/src/
H A Dlayout.rs75 #[cfg_attr(kani, kani::requires(align.is_power_of_two() && phase < align.get()))]
85 const_assert!(align.get().is_power_of_two()); in try_to_nonzero_elem_size()
101 align.is_power_of_two() && phase < align.get()
135 align.is_power_of_two() && align.get() <= self.0.get()
913 #[cfg_attr(kani, kani::requires(repr_align.map_or(true, |align| align.is_power_of_two())))] in project()
932 const_assert!(align.get().is_power_of_two()); in project()
1193 const_assert!(max_align.get().is_power_of_two()); in test_dst_layout_extend_sized_with_dst()
2364 assert!(trailing_alignment.get().is_power_of_two());
2367 assert!(packed.get().is_power_of_two());
2368 assert!(align.get().is_power_of_two());
[all...]
/linux/rust/kernel/alloc/
H A Dallocator.rs296 assert!(align.is_power_of_two()); in test_alignment()
/linux/rust/zerocopy-derive/
H A Drepr.rs569 // `NonZeroU32::is_power_of_two` is unsupported on our MSRV. in from_meta()
576 if nz.get().is_power_of_two() { in from_meta()