Function gegl::parallel_distribute_range
source · pub fn parallel_distribute_range<P: FnMut(usize, usize)>(
size: usize,
thread_cost: f64,
func: P
)
Expand description
Distributes the processing of a linear data-structure across multiple threads, by calling the given function with different sub-ranges on different threads.
size
the total size of the data
thread_cost
the cost of using each additional thread, relative to the cost of processing a single data element
func
the function to call