Rhpc_sapplyLB: Parallel sapply with load balancing

Rhpc_sapplyLBR Documentation

Parallel sapply with load balancing

Description

MPI-based version of sapply with load balancing for better performance.

Usage

Rhpc_sapplyLB(cl = NULL, X, FUN, ...,
              usequote = ifelse(is.logical(getOption("Rhpc.usequote")),
                                getOption("Rhpc.usequote"), TRUE),
              simplify = TRUE,
              USE.NAMES = TRUE)

Arguments

cl

external pointer to MPI communicator

X

vector or list to be processed

FUN

function to apply to each element of X

...

additional arguments passed to FUN

usequote

logical; if FALSE, quote handling is skipped for performance improvement

simplify

logical or character string; if possible, simplify the result

USE.NAMES

logical; if TRUE and X is character, use X as names

Details

This function combines load-balanced distribution with result simplification. Workers receive tasks dynamically as they become available, and results are simplified when possible.

Value

A simplified version of the result (vector, matrix, array, or list) depending on simplify.

See Also

Rhpc_sapply, Rhpc_lapplyLB, Rhpc_apply


Rhpc documentation built on Aug. 4, 2026, 1:07 a.m.