File: getDoParWorkers.Rd

package info (click to toggle)
r-cran-foreach 1.4.0-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 784 kB
  • sloc: sh: 58; makefile: 1
file content (41 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download | duplicates (5)
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
36
37
38
39
40
41
\name{getDoParWorkers}
\alias{getDoParWorkers}
\alias{getDoParRegistered}
\alias{getDoParName}
\alias{getDoParVersion}
\title{Functions Providing Information on the doPar Backend}
\description{
The \code{getDoParWorkers} function returns the number of
execution workers there are in the currently registered doPar backend.
It can be useful when determining how to split up the work to be executed
in parallel.  A \code{1} is returned by default.

The \code{getDoParRegistered} function returns TRUE if a doPar backend
has been registered, otherwise FALSE.

The \code{getDoParName} function returns the name of the currently
registered doPar backend.  A \code{NULL} is returned if no backend is
registered.

The \code{getDoParVersion} function returns the version of the currently
registered doPar backend.  A \code{NULL} is returned if no backend is 
registered.
}
\usage{
getDoParWorkers()
getDoParRegistered()
getDoParName()
getDoParVersion()
}

\examples{
cat(sprintf('\%s backend is registered\n',
            if(getDoParRegistered()) 'A' else 'No'))
cat(sprintf('Running with \%d worker(s)\n', getDoParWorkers()))
(name <- getDoParName())
(ver <- getDoParVersion())
if (getDoParRegistered())
  cat(sprintf('Currently using \%s [\%s]\n', name, ver))
}

\keyword{utilities}