R/onLoad.r

".onLoad" <- function(libname, pkgname) {
	# Try to load the OpenCL package and select a device to use
	.OpenCL_init() # Not yet, the OpenCL package needs a new version
	
	# Set the default number of processes to use for parallel computations
	if (is.null(options("mc.cores")$mc.cores)) {
		options(mc.cores=parallel::detectCores(logical=TRUE))
	}
}

".onUnload" <- function(libpath) {
	library.dynam.unload("moveBB", libpath);
}

Try the moveBB package in your browser

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

moveBB documentation built on May 2, 2019, 5:50 p.m.