| use_threads | R Documentation |
Specify the number of threads for ensemble simulations in Julia. This will not overwrite your current global setting for JULIA_NUM_THREADS. Note that this does not affect regular simulations with simulate().
use_threads(n = parallel::detectCores() - 1, stop = FALSE)
n |
Number of Julia threads to use. Defaults to parallel::detectCores() - 1. If set to a value higher than the number of available cores minus 1, it will be set to the number of available cores minus 1. |
stop |
Stop using threaded ensemble simulations. Defaults to FALSE. |
No return value, called for side effects
ensemble(), use_julia()
# Use Julia with 4 threads
use_julia()
use_threads(n = 4)
# Stop using threads
use_threads(stop = TRUE)
# Stop using Julia
use_julia(stop = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.