parallelize.dynamic (version 0.9-1)

Apply: Expose an apply-loop to parallelization

Description

Replacing and apply/lapply/sapply call with a Apply/Lapply/Sapply call makes it amenable to analysis by the parallelize function that can determine dynamic parallelism in running code.

Usage

Apply(X, MARGIN, FUN, ...) Lapply(l, .f, ..., Lapply_config = Lapply_getConfig(), Lapply_local = Lapply_config$local, Lapply_chunk = 1) Sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE)

Arguments

X
See documentation for apply.
MARGIN
See documentation for apply.
FUN
See documentation for sapply.
simplify
See documentation for sapply.
USE.NAMES
See documentation for sapply.
.f
See documentation for lapply.
l
See documentation for lapply.
Lapply_config
See documentation for parallelize_intialize. Normally, this argument should be ignored.
Lapply_local
Force local execution. Normally, this argument should be ignored.
Lapply_chunk
Normally, this argument should be ignored.
...
See documentation for apply.

Details

Please refer to the documentation of apply/lapply/sapply for further documenation. The semantics of Apply/Lapply/Sapply are identical to apply/lapply/sapply. Using these functions implies that you want the parallelization mechanism to be applied to these loops.

See Also

parallelize

Examples

Run this code
	r0 = sapply(1:10, function(x)x^2);
	r1 = Sapply(1:10, function(x)x^2);
	print(all(r0 == r1));

Run the code above in your browser using DataLab