Function isAlignedLog2 [src]
Returns true if addr is aligned to 2^log2_alignment.
More efficient than isAligned when alignment is known to be a power of 2.
log2_alignment must be < @bitSizeOf(usize).
Prototype
pub fn isAlignedLog2(addr: usize, log2_alignment: u8) bool Parameters
addr: usizelog2_alignment: u8 Source
pub fn isAlignedLog2(addr: usize, log2_alignment: u8) bool {
return @ctz(addr) >= log2_alignment;
}