setup: Computational Setup Functions

Description Usage Arguments Value

Description

Functions used internally to setup the computational environment.

setupBackend sets up a foreach backend given some specifications.

Usage

1
2
3
4
5
6
7
8
9
setupBackend(spec, backend, optional = FALSE, verbose = FALSE)

setupSharedMemory(verbose)

setupTempDirectory(verbose, dir = getwd())

setupLibPaths(pkg = "NMF", verbose = FALSE)

setupRNG(seed, n, verbose = FALSE)

Arguments

spec

target parallel specification: either TRUE or FALSE, or a single numeric value that specifies the number of cores to setup.

backend

value from argument .pbackend of nmf.

optional

a logical that indicates if the specification must be fully satisfied, throwing an error if it is not, or if one can switch back to sequential, only outputting a verbose message.

verbose

logical or integer level of verbosity for message outputs.

dir

path where to create the temporary directory

pkg

package name whose path should be exported the workers.

seed

initial RNG seed specification

n

number of RNG seeds to generate

Value

Returns FALSE if no foreach backend is to be used, NA if the currently registered backend is to be used, or, if this function call registered a new backend, the previously registered backend as a foreach object, so that it can be restored after the computation is over.


renozao/NMF documentation built on June 14, 2020, 9:35 p.m.