bploop | R Documentation |
The functions documented on this page are primarily for use within BiocParallel to enable SNOW-style parallel evaluation, using communication between manager and worker nodes through sockets.
## S3 method for class 'lapply'
bploop(manager, X, FUN, ARGS, BPPARAM, BPOPTIONS = bpoptions(), BPREDO, ...)
## S3 method for class 'iterate'
bploop(manager, ITER, FUN, ARGS, BPPARAM, BPOPTIONS = bpoptions(),
REDUCE, BPREDO, init, reduce.in.order, ...)
manager |
An object representing the manager node. For workers,
this is the node to which the worker will communicate. For managers,
this is the form of iteration – |
X |
A vector of jobs to be performed. |
FUN |
A function to apply to each job. |
ARGS |
A list of arguments to be passed to |
BPPARAM |
An instance of a |
ITER |
A function used to generate jobs. No more jobs are
available when |
REDUCE |
(Optional) A function combining two values returned by
|
init |
(Optional) Initial value for reduction. |
reduce.in.order |
(Optional) logical(1) indicating that
reduction must occur in the order jobs are dispatched
( |
BPREDO |
(Optional) A |
... |
Additional arguments, ignored in all cases. |
BPOPTIONS |
Additional options to control the behavior of the parallel evaluation, see |
Workers enter a loop. They wait to receive a message (R list) from
the manager
. The message contains a type
element, with
evaluation as follows:
Execute the R code in the message, returning
the result to the manager
.
Signal termination to the manager
,
terminate the worker.
Managers under lapply
dispatch pre-determined jobs, X
,
to workers, collecting the results from and dispatching new jobs to
the first available worker. The manager returns a list of results, in
a one-to-one correspondence with the order of jobs supplied, when all
jobs have been evaluated.
Managers under iterate
dispatch an undetermined number of jobs
to workers, collecting previous jobs from and dispatching new jobs to
the first available worker. Dispatch continues until available jobs
are exhausted. The return value is by default a list of results in a
one-to-one correspondence with the order of jobs supplied. The return
value is influenced by REDUCE
, init
, and
reduce.in.order
.
Valerie Obenchain, Martin Morgan. Derived from similar functionality in the snow and parallel packages.
## These functions are not meant to be called by the end user.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.