1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parallelRegisterLevels.R
\name{parallelRegisterLevels}
\alias{parallelRegisterLevels}
\title{Register a parallelization level}
\usage{
parallelRegisterLevels(package = "custom", levels)
}
\arguments{
\item{package}{(\code{character(1)})\cr
Name of your package.
Default is \dQuote{custom} (we are not in a package).}
\item{levels}{(\code{character(1)})\cr
Available levels that are used in the \code{\link[=parallelMap]{parallelMap()}} operations of your
package or code. If \code{package} is not missing, all levels will be prefixed
with \dQuote{package.}.}
}
\value{
Nothing.
}
\description{
Package developers should call this function in their packages'
\code{base::.onLoad()}. This enables the user to query available levels and bind
parallelization to specific levels. This is especially helpful for nested
calls to \code{\link[=parallelMap]{parallelMap()}}, e.g. where the inner call should be parallelized
instead of the outer one.
To avoid name clashes, we encourage developers to always specify the argument
\code{package}. This will prefix the specified levels with the string containing
the package name, e.g. \code{parallelRegisterLevels(package="foo", levels="dummy")} will register the level \dQuote{foo.dummy} and users can
start parallelization for this level with \verb{parallelStart(<backend>, level = "parallelMap.dummy")}. If you do not provide \code{package}, the level names will
be associated with category \dQuote{custom} and can there be later referred
to with \dQuote{custom.dummy}.
}
|