setThreadOptions: Thread options for TBB

Description Usage Arguments Details Value Examples

View source: R/tbb.R

Description

Set thread options (number of threads to use for task scheduling and stack size per-thread) for TBB.

Usage

1
2
3
setThreadOptions(numThreads = "auto", 
                 stackSize = "auto")
defaultNumThreads()

Arguments

numThreads

Number of threads to use for task scheduling (call defaultNumThreads to determine the the default value used for "auto").

stackSize

Stack size (in bytes) to use for worker threads. The default used for "auto" is 2MB on 32-bit systems and 4MB on 64-bit systems.

Details

The TBB library 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.

Value

The defaultNumThreads returns the default number of threads that are used by TBB if another value isn't specified using setThreadOptions.

Examples

1
2
3
4
5
6
## Not run: 
setThreadOptions(numThreads = 4)

defaultNumThreads()

## End(Not run)

jjallaire/TBB documentation built on May 19, 2019, 11:37 a.m.