Learn R Programming

NMF (version 0.2.2)

registerDoBackend: Utilities and Extensions for Foreach Loops

Description

registerDoBackend is a unified register function for foreach backends.

getDoBackend returns the internal data of the currently registered foreach %dopar% backend.

setDoBackend is identical to setDoPar, but returns the internal of the previously registered backend.

register is a generic function that register objects. It is used to as a unified interface to register foreach backends.

ForeachBackend is a factory method for foreach backend objects.

getDoParHosts is a generic function that returns the hostname of the worker nodes used by a backend.

getDoParNHosts returns the number of hosts used by a backend.

Usage

registerDoBackend(object, ...)

getDoBackend()

setDoBackend(data, cleanup = FALSE)

register(x, ...)

ForeachBackend(object, ...)

## S3 method for class 'doParallel_backend': ForeachBackend(object, cl, type = NULL)

## S3 method for class 'doPSOCK_backend': ForeachBackend(object, cl)

## S3 method for class 'doMPI_backend': ForeachBackend(object, cl)

getDoParHosts(object, ...)

getDoParNHosts(object)

Arguments

object
specification of a foreach backend, e.g. SEQ, PAR (for doParallel), MPI, etc...
...
extra arguments passed to the backend own registration function.
data
internal data of a foreach %dopar% backend.
cleanup
logical that indicates if the previous backend's cleanup procedure should be run, before setting the new backend.
x
specification of a foreach backend
cl
cluster specification: a cluster object or a numeric that indicates the number of nodes to use.
type
type of cluster, See makeCluster.