Module extendr_api::prelude::utils::thread
Expand description
Utilities relating to threading and parallelism.
Structs§
Functions§
- Executes the tasks by passing the values in
0..n_tasks
toop
, 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_count
consumers, for the consumer at indexidx
. - The amount of threads that should ideally execute an operation with the given parallelism.