View source: R/aaa-backend-core.R
| charr_threads | R Documentation |
charr_threads() sets how many threads charr's "altrep" backend may use
for the operations that have a data-parallel shape. Operations without that
shape, and the "base" and "reference" backends, always run on one thread.
charr_threads(value = NULL)
value |
|
An eligible operation uses the requested count, capped by its number of tasks and an internal safety limit of 256. Charr does not apply an input-size heuristic, so even a small eligible input starts workers when the count is greater than one. A few modes must stay serial because their results depend on the order in which elements run.
The count defaults to 1, so charr is single-threaded until asked
otherwise. It is held in native code rather than in an R option, because
threading happens only in native code. This accessor is the only way to
change it: setting an option named charr_threads has no effect.
The current count when querying. When setting, the previous count is returned invisibly.
old <- charr_threads(2)
charr_threads()
charr_threads(old)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.