getBackend: Get BiocParallel back-end

Description Usage Arguments Value Examples

View source: R/REMPtools.R

Description

getBackend is used to obtain BiocParallel Back-end to allow parallel computing.

Usage

1
getBackend(ncore, BPPARAM = NULL, verbose = FALSE)

Arguments

ncore

Number of cores used for parallel computing. By default max number of cores available in the machine will be utilized. If ncore = 1, no parallel computing is allowed.

BPPARAM

An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation. If not specified, default back-end in the machine will be used.

verbose

Logical parameter. Should the function be verbose?

Value

A BiocParallel object that can be used for parallel computing.

Examples

1
2
3
4
5
6
7
# Non-parallel mode
be <- getBackend(ncore = 1, verbose = TRUE)
be

# parallel mode (2 workers)
be <- getBackend(ncore = 2, verbose = TRUE)
be

REMP documentation built on Nov. 8, 2020, 8:05 p.m.