Wish
Add availableThreads(), which works similarly to availableCores(), but instead reports on settings that control multi_threading_, in contrast to multi_processing_.
It should work something like:
> parallelly::availableThreads(which = "all")
system nproc omp tbb rcpp
16 16 4 4 8
Open questions
- What should, say,
system report on? Should it be detectCores() * detectThreadsPerCores()?
- Should this also report on anything that
availableCores() report on? Basically, availableCores() * detectThreadsPerCores()?
- For queries that require loading a package (e.g.
RcppParallel::defaultNumThreads()), what should happen? Should it return NA_integer_ if package is not loaded? Should it attempt to load it? (probably not)
- ...
See also