Skip to contents

Computes row sums of the matrix stored in a resident_handle, using a GPU-resident reduction when the backend supports it to avoid a round-trip download. Falls back to base::rowSums on the materialized matrix when no resident reduction is available.

Usage

rh_rowSums(h)

Arguments

h

A resident_handle.

Value

Numeric vector of length nrow(h).

Examples

# \donttest{
# requires a backend with residency support (e.g. MLX, OpenCL)
# }