setup_parallel_execution: Setup parallel execution with automatic backend detection

View source: R/setup_parallel_execution.R

setup_parallel_executionR Documentation

Setup parallel execution with automatic backend detection

Description

Internal helper to manage parallel backend setup with support for user-managed backends, external clusters, and internal clusters.

Usage

setup_parallel_execution(cluster = NULL, n.cores = parallel::detectCores() - 1)

Arguments

cluster

A cluster object from parallel::makeCluster(), or NULL

n.cores

Number of cores for internal cluster creation

Value

A list with:

  • cluster: The cluster object to pass to child functions (or NULL)

  • mode: One of "user_backend", "external_cluster", "internal_cluster", "sequential"

  • cleanup: A function to call in on.exit() for proper cleanup

See Also

Other utilities: .vif_to_df(), auc(), beowulf_cluster(), objects_size(), optimization_function(), prepare_importance_spatial(), rescale_vector(), root_mean_squared_error(), standard_error(), statistical_mode(), thinning(), thinning_til_n()


spatialRF documentation built on Dec. 20, 2025, 1:07 a.m.