Skip to main content

combine_equal_length_masks

Function combine_equal_length_masks 

Source
fn combine_equal_length_masks<F>(
    l: &BooleanBuffer,
    r: &BooleanBuffer,
    op: F,
) -> BooleanBuffer
where F: FnMut(u64, u64) -> u64,
Expand description

Combines two masks of equal length with the bitwise operation op.

BitAnd/BitOr on &BooleanBuffer normalise the result to a zero bit offset, which costs a second allocation and a shifting copy when both operands share the same non-zero sub-64-bit alignment, causing from_bitwise_binary_op to return a non-zero-offset result. Building the buffer directly keeps the offset, as the unequal-length path does.