Internal Functions for SNOW-style Parallel Evaluation
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.
"bploop"(manager, ...)"bploop"(manager, ...)"bploop"(manager, ...)"bploop"(manager, X, FUN, ARGFUN, BPPARAM, ...)"bploop"(manager, ITER, FUN, ARGFUN, BPPARAM, REDUCE, init, reduce.in.order, ...)
- 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 --
- A vector of jobs to be performed.
- A function to apply to each job.
- A function accepting an integer value indicating the
job number, and returning the job-specific arguments to
- An instance of a
- A function used to generate jobs. No more jobs are
- (Optional) A function combining two values returned by
FUNinto a single value.
- (Optional) Initial value for reduction.
- (Optional) logical(1) indicating that
reduction must occur in the order jobs are dispatched
TRUE) or that reduction can occur in the order jobs are completed (
- Additional arguments, ignored in all cases.
Workers enter a loop. They wait to receive a message (R list) from
manager. The message contains a
type element, with
evaluation as follows:
manager, terminate the worker.
lapply dispatch pre-determined jobs,
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.
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
## These functions are not meant to be called by the end user.