R/zzz.R

Defines functions .onLoad

pkgEnv <- new.env(parent = emptyenv())
pkgEnv$nThreads <- NULL

## This will set the maximum number of cores
## and number of threads on a given machine
## when the package is loaded
.onLoad <- function(libname, pkgname) {
    tempThreads <- stdThreadMax()
    
    if (is.na(tempThreads)) {
        pkgEnv$nThreads <- 1L
    } else {
        pkgEnv$nThreads <- tempThreads
    }
    
    invisible()
}

Try the RcppBigIntAlgos package in your browser

Any scripts or data that you put into this service are public.

RcppBigIntAlgos documentation built on Aug. 16, 2023, 5:06 p.m.