Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


ravetools (version 0.2.2)

parallel-options: Set or get thread options

Description

Set or get thread options

Usage

detect_threads()

ravetools_threads(n_threads = "auto", stack_size = "auto")

Value

detect_threads returns an integer of default threads that is determined by the number of CPU cores; ravetools_threads

returns nothing.

Arguments

n_threads

number of threads to set

stack_size

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.

Examples

Run this code

detect_threads()

ravetools_threads(n_threads = 2)

Run the code above in your browser using DataLab