fn reverse_pos(mask: i32) -> usize {
    // We are dealing with little endian here, where the most significant byte
    // is at a higher address. That means the most significant bit that is set
    // corresponds to the position of our last matching byte. The position from
    // the end of the mask is therefore the number of leading zeros in a 32
    // bit integer, and the position from the start of the mask is therefore
    // 32 - (leading zeros) - 1.
    VECTOR_SIZE - (mask as u32).leading_zeros() as usize - 1
}
/// Compute the position of the last matching byte from the given mask. The
/// position returned is always in the range [0, 31].
///
/// The mask given is expected to be the result of _mm256_movemask_epi8.
Compute the position of the last matching byte from the given mask. The
position returned is always in the range [0, 31].

The mask given is expected to be the result of _mm256_movemask_epi8.
Compute the position of the last matching byte from the given mask . The position returned is always in the range [ 0 31 ] . The mask given is expected to be the result of _mm256_movemask_epi8 .
fn reverse_pos(mask: i32) -> usize {
    // We are dealing with little endian here, where the most significant byte
    // is at a higher address. That means the most significant bit that is set
    // corresponds to the position of our last matching byte. The position from
    // the end of the mask is therefore the number of leading zeros in a 32
    // bit integer, and the position from the start of the mask is therefore
    // 32 - (leading zeros) - 1.
    VECTOR_SIZE - (mask as u32).leading_zeros() as usize - 1
}
fn reverse_pos ( mask : i32 ) -> usize { // We are dealing with little endian here, where the most significant byte // is at a higher address. That means the most significant bit that is set // corresponds to the position of our last matching byte. The position from // the end of the mask is therefore the number of leading zeros in a 32 // bit integer, and the position from the start of the mask is therefore // 32 - (leading zeros) - 1. VECTOR_SIZE - ( mask as u32 ) . leading_zeros ( ) as usize - 1 }
Compute the position of the last matching byte from the given mask.
Compute the position of the last matching byte from the given mask .
mask
i32
mask
i32