RcppParallel is automatically initialized with the default number of threads
and thread stack size when it loads. You can call setThreadOptions()
at
any time to change the defaults.
The parallelFor()
and parallelReduce()
also accept numThreads
as
an argument, if you'd like to control the number of threads specifically
to be made available for a particular parallel function call. Note that
this value is advisory, and TBB may choose a smaller number of threads
if the number of requested threads cannot be honored on the system.