getCores: Calculate number of cores to use for multi-core functions

View source: R/getCores.r

getCoresR Documentation

Calculate number of cores to use for multi-core functions

Description

This function calculates the number of cores to use for multi-core functions based on user preferences, size of the raster object, number of available cores, and whether or not the user wants to use multi-core functionality even if it is possible to do the entire raster processing in one block.

Usage

getCores(rast, cores = 2, forceMulti = FALSE)

Arguments

rast

Raster, RasterStack, or RasterBrick

cores

Integer > 0. Number of cores desired to be used. Default is 2.

forceMulti

Logical. If TRUE then force number of cores to be >1 even if the raster processing can be done in one chunk. Default is FALSE.

Value

Integer.


adamlilith/enmSdm documentation built on Jan. 6, 2023, 11 a.m.