startParallel: Start Parallel Backend for rmoo Package

View source: R/parallel.R

startParallelR Documentation

Start Parallel Backend for rmoo Package

Description

This function sets up parallel computing using the parallel and doParallel packages. It supports both "snow" (PSOCK) and "multicore" backends depending on the OS.

Usage

startParallel(parallel = TRUE, ...)

Arguments

parallel

Logical, numeric, character, or a cluster object. If TRUE, uses all detected cores. If numeric, it specifies the number of cores. If character, should be "snow" or "multicore". If a cluster object, it will use that cluster.

...

Additional arguments (currently unused).

Value

An object of class logical with attributes:

  • type: cluster type ("snow" or "multicore")

  • cores: number of cores used

  • cluster: the cluster object created or passed

Examples

## Not run: 
  cl <- startParallel(TRUE)
  stopParallel(attr(cl, "cluster"))

## End(Not run)


benitezfj/rmoo documentation built on July 16, 2025, 11:07 p.m.