c.applyLB: Portable apply function with load balancing

Description Usage Arguments Examples

Description

Wrapper function for clusterApplyLB(), Rhpc_apply(), and an implementation of 'mcapply' with load balancing. Note that for MPI there is no load balancing.

Usage

1
2
## S3 method for class 'applyLB'
c(X, MARGIN, FUN, ...)

Arguments

X

an object with dim > 1, each element of which is individually passed to FUN

MARGIN

either 1 for row and 2 for collumn.

FUN

a function object, takes X as first argument

...

other arguments, possibly named, to be passed to every iteration of FUN

Examples

1
2
3
mat <- matrix(1:12, 3, 4)
c.applyLB(mat, 1, sum)	# a parallel implementation of rowSums
                       # Note that the serial version is likely faster for this function

bamonroe/ctools documentation built on May 11, 2019, 6:19 p.m.