Note, this only applies for OpenMP and Intel Thread Building Blocks backends.
1 |
rth.nthreads()
will determine the maximum number of threads to use by
checking against the environment variable RTH_NUM_THREADS
(and in the
case of OpenMP, OMP_NUM_THREADS
), and failing that, the default for
the given backend. For OpenMP this means that the number of cores
(physical+logical) will be returned. For Intel Thread Building Blocks, the
default is the value -1
.
For any function taking nthreads=
as an argument, the priority is
(highest to lowest):
nthreads argument in the R-level Rth function |
RTH_NUM_THREADS environment variable |
OMP_NUM_THREADS environment variable (for OpenMP backends) |
Number of cores |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.