getBackend: Get BiocParallel back-end

View source: R/REMPtools.R

getBackendR Documentation

Get BiocParallel back-end

Description

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

Usage

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

# Non-parallel mode
be <- getBackend(ncore = 1, verbose = TRUE)
be

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


YinanZheng/REMP documentation built on May 14, 2022, 5:58 p.m.