Function ocl_core::util::vec_remove_rebuild
[−]
[src]
pub fn vec_remove_rebuild<T: Clone + Copy>(
orig_vec: &mut Vec<T>,
remove_list: &[usize],
rebuild_threshold: usize
) -> OclResult<()>
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.
Safety
Should be perfectly safe, just need to test it a bit.