setThreadOptions: Thread options for RcppParallel

Description Usage Arguments Details Value Examples

Description

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

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 (note that this parameter has no effect on Windows).

Details

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.

Value

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

Examples

1
2
3
4
5

Example output

[1] 1

RcppParallel documentation built on May 23, 2019, 1:03 a.m.