Module extendr_api::prelude::utils::thread
source · Expand description
Utilities relating to threading and parallelism.
Structs§
Functions§
- Executes the tasks by passing the values in
0..n_taskstoop, possibly in parallel, while splitting the amount of parallelism between the tasks. - Executes the two operations, possibly in parallel, while splitting the amount of parallelism between the two.
- Returns the start and length of a subsegment of
0..n, split betweenchunk_countconsumers, for the consumer at indexidx. - The amount of threads that should ideally execute an operation with the given parallelism.