Determines the number of processors used by functions that are parallelized.
If set to -1 (max_procs=-1
), the default, all available processors will be
used. To limit processing, set max_procs
to a positive whole number less
than the number of system processors.
References
For more information, see https://www.whiteboxgeo.com/manual/wbw-user-manual/book/tool_help.html#max_procs
Examples
if (FALSE) { # \dontrun{
raster_path <- system.file("extdata/dem.tif", package = "wbw")
x <- wbw_read_raster(raster_path)
# Use 1 processor
wbw_max_procs(1)
system.time(wbw_slope(x))
# Use all available processors
wbw_max_procs(-1)
system.time(wbw_slope(x))
} # }