Skip to contents

enable or disable parallelism use across usci library (when enabled uses rayon).

Usage

set_par(enable = TRUE)

get_par()

Arguments

enable

boolean flag to indicate if parallelism should be enabled

Details

note: to set the exact number of threads used when parallelism is enabled the RAYON_NUM_THREADS environment variable needs to be set prior to loading the usci library

Examples

curr_par_stat <- get_par()
curr_par_stat # view current parallelization configuration
#> [1] FALSE

set_par(!curr_par_stat) # change parallelization in package
get_par()
#> [1] TRUE

set_par(curr_par_stat)
get_par()
#> [1] FALSE