clusterApply: Apply operations using clusters

Description Usage Arguments Value See Also Examples

Description

These functions provide several ways to parallelize computations using a cluster.

NOTE: This man page is for the clusterCall, clusterApply, clusterApplyLB, clusterEvalQ, clusterExport, clusterMap, clusterSplit, parLapply, parSapply, parApply, parRapply, parCapply, parLapplyLB, and parSapplyLB S4 generic functions defined in the BiocGenerics package. See ?parallel::clusterApply for the default methods (defined in the parallel package). Bioconductor packages can define specific methods for cluster-like objects not supported by the default methods.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
clusterCall(cl=NULL, fun, ...)
clusterApply(cl=NULL, x, fun, ...)
clusterApplyLB(cl=NULL, x, fun, ...)
clusterEvalQ(cl=NULL, expr)
clusterExport(cl=NULL, varlist, envir=.GlobalEnv)
clusterMap(cl=NULL, fun, ..., MoreArgs=NULL, RECYCLE=TRUE,
           SIMPLIFY=FALSE, USE.NAMES=TRUE,
           .scheduling=c("static", "dynamic"))
clusterSplit(cl=NULL, seq)

parLapply(cl=NULL, X, fun, ..., chunk.size=NULL)
parSapply(cl=NULL, X, FUN, ..., simplify=TRUE,
          USE.NAMES=TRUE, chunk.size=NULL)
parApply(cl=NULL, X, MARGIN, FUN, ..., chunk.size=NULL)
parRapply(cl=NULL, x, FUN, ..., chunk.size=NULL)
parCapply(cl=NULL, x, FUN, ..., chunk.size=NULL)

parLapplyLB(cl=NULL, X, fun, ..., chunk.size=NULL)
parSapplyLB(cl=NULL, X, FUN, ..., simplify=TRUE,
            USE.NAMES=TRUE, chunk.size=NULL)

Arguments

cl

A cluster-like object.

x

A vector-like object for clusterApply and clusterApplyLB. A matrix-like object for parRapply and parCapply.

seq

Vector-like object to split.

X

A vector-like object for parLapply, parSapply, parLapplyLB, and parSapplyLB. An array-like object for parApply.

fun, ..., expr, varlist, envir, MoreArgs, RECYCLE, SIMPLIFY, USE.NAMES, .scheduling, chunk.size, FUN, simplify, MARGIN

See ?parallel::clusterApply for a description of these arguments.

Value

See ?parallel::clusterApply for the value returned by the default methods.

Specific methods defined in Bioconductor packages should behave like the default methods.

See Also

Examples

 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
clusterCall  # note the dispatch on the 'cl' arg only
showMethods("clusterCall")
selectMethod("clusterCall", "ANY")  # the default method

clusterApply  # note the dispatch on the 'cl' and 'x' args only
showMethods("clusterApply")
selectMethod("clusterApply", c("ANY", "ANY"))  # the default method

clusterApplyLB  # note the dispatch on the 'cl' and 'x' args only
showMethods("clusterApplyLB")
selectMethod("clusterApplyLB", c("ANY", "ANY"))  # the default method

clusterEvalQ  # note the dispatch on the 'cl' arg only
showMethods("clusterEvalQ")
selectMethod("clusterEvalQ", "ANY")  # the default method

clusterExport  # note the dispatch on the 'cl' arg only
showMethods("clusterExport")
selectMethod("clusterExport", "ANY")  # the default method

clusterMap  # note the dispatch on the 'cl' arg only
showMethods("clusterMap")
selectMethod("clusterMap", "ANY")  # the default method

clusterSplit
showMethods("clusterSplit")
selectMethod("clusterSplit", c("ANY", "ANY"))  # the default method

parLapply  # note the dispatch on the 'cl' and 'X' args only
showMethods("parLapply")
selectMethod("parLapply", c("ANY", "ANY"))  # the default method

parSapply  # note the dispatch on the 'cl' and 'X' args only
showMethods("parSapply")
selectMethod("parSapply", c("ANY", "ANY"))  # the default method

parApply  # note the dispatch on the 'cl' and 'X' args only
showMethods("parApply")
selectMethod("parApply", c("ANY", "ANY"))  # the default method

parRapply  # note the dispatch on the 'cl' and 'x' args only
showMethods("parRapply")
selectMethod("parRapply", c("ANY", "ANY"))  # the default method

parCapply  # note the dispatch on the 'cl' and 'x' args only
showMethods("parCapply")
selectMethod("parCapply", c("ANY", "ANY"))  # the default method

parLapplyLB  # note the dispatch on the 'cl' and 'X' args only
showMethods("parLapplyLB")
selectMethod("parLapplyLB", c("ANY", "ANY"))  # the default method

parSapplyLB  # note the dispatch on the 'cl' and 'X' args only
showMethods("parSapplyLB")
selectMethod("parSapplyLB", c("ANY", "ANY"))  # the default method

BiocGenerics documentation built on April 17, 2021, 6:01 p.m.