## ----------------------------------------------------------------------
## The registry
## ----------------------------------------------------------------------
## The default registry.
registered()
## When default = TRUE the last param registered becomes the new default.
snowparam <- SnowParam(workers = 3, type = "SOCK")
register(snowparam, default = TRUE)
registered()
## Retrieve the default back-end,
bpparam()
## or a specific BiocParallelParam.
bpparam("SnowParam")
## ----------------------------------------------------------------------
## Specifying a back-end for evaluation
## ----------------------------------------------------------------------
## The back-end of choice is specified in the BPPARAM argument to
## the BiocParallel functions. None, one, or multiple back-ends can be
## provided.
bplapply(1:6, sqrt, BPPARAM = MulticoreParam(3))
## When not specified, the default from the registry is used.
bplapply(1:6, sqrt)
Run the code above in your browser using DataCamp Workspace