delarr_shard: Create a delayed array backed by shared memory

View source: R/delarr-shard.R

delarr_shardR Documentation

Create a delayed array backed by shared memory

Description

Wraps a numeric matrix or array into shard's shared memory, returning a delarr. The shared ALTREP vector is stored on the seed so that collect_shard() can reuse it without re-sharing (zero-copy).

Usage

delarr_shard(x, backing = "auto")

Arguments

x

A numeric matrix or array.

backing

Backing type passed to shard::share().

Value

A delarr backed by shared memory.

Examples

if (requireNamespace("shard", quietly = TRUE)) {
  mat <- matrix(rnorm(20), 4, 5)
  darr <- delarr_shard(mat)
  collect(darr)
}

delarr documentation built on July 1, 2026, 1:06 a.m.