-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathsetThreadOptions.Rd
More file actions
48 lines (43 loc) · 1.22 KB
/
setThreadOptions.Rd
File metadata and controls
48 lines (43 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\name{setThreadOptions}
\alias{setThreadOptions}
\alias{defaultNumThreads}
\title{
Thread options for RcppParallel
}
\description{
Set thread options (number of threads to use for task scheduling and stack
size per-thread) for RcppParallel.
}
\usage{
setThreadOptions(numThreads = "auto",
stackSize = "auto")
defaultNumThreads()
}
\arguments{
\item{numThreads}{
Number of threads to use for task scheduling (call
\code{defaultNumThreads} to determine the the default
value used for "auto").
}
\item{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
\code{setThreadOptions} at any time to change the defaults.
}
\value{
The \code{defaultNumThreads} returns the default number of threads
that are used by RcppParallel if another value isn't specified using
\code{setThreadOptions}.
}
\examples{
library(RcppParallel)
setThreadOptions(numThreads = 4)
defaultNumThreads()
}