extendr_api::prelude::utils

Module thread

Expand description

Utilities relating to threading and parallelism.

Structs§

Functions§

  • Executes the tasks by passing the values in 0..n_tasks to op, 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 between chunk_count consumers, for the consumer at index idx.
  • The amount of threads that should ideally execute an operation with the given parallelism.