[][src]Function fil_ocl_core::util::vec_remove_rebuild

pub fn vec_remove_rebuild<T: Clone + Copy>(
    orig_vec: &mut Vec<T>,
    remove_list: &[usize],
    rebuild_threshold: usize
) -> Result<(), VecRemoveRebuildError>

Batch removes elements from a vector using a list of indices to remove.

Will create a new vector and do a streamlined rebuild if remove_list.len() > rebuild_threshold. Threshold should typically be set very low (less than probably 5 or 10) as it's expensive to remove one by one.