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

Description Usage Arguments Value

View source: R/getCores.r

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's possible to do the entire raster processing in one block.

Usage

1
getCores(rast, cores = 2, forceMulti = TRUE, ...)

Arguments

rast

Raster, RasterStack, or RasterBrick

cores

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

forceMulti

Logical. If TRUE (default) then force number of cores to be >1 even if the raster processing can be done in one chunk.

...

Other arguments. (Unused.)

Value

Integer.


adamlilith/omnibus documentation built on Nov. 21, 2018, 11:01 a.m.