Skip to main content

select_word

Function select_word 

Source
pub unsafe fn select_word(word: u64, rank: usize) -> usize
Examples found in repository?
crates/competitive/src/data_structure/bit_vector.rs (line 237)
233    pub fn select_word(bits: u64, rank: usize) -> usize {
234        #[cfg(target_arch = "x86_64")]
235        if is_x86_feature_detected!("bmi2") {
236            // SAFETY: BMI2 is available and the caller checked the occurrence count.
237            return unsafe { simd::select_word(bits, rank) };
238        }
239        select_word_scalar(bits, rank)
240    }