summaryrefslogtreecommitdiff
path: root/src/gallium/frontends/rusticl/util/bitset.rs
blob: f7e8a471b10aa29e381ec1b9257c572cf97dcb45 (plain)
1
2
3
4
5
6
pub fn test_bit(bitset: &[u32], bit: u32) -> bool {
    let idx = bit / 32;
    let test = bit % 32;

    bitset[idx as usize] & (1 << test) != 0
}