dot-ggmlr_batch_shards: Split a batch index range into (near) equal contiguous shards

.ggmlr_batch_shardsR Documentation

Split a batch index range into (near) equal contiguous shards

Description

Helper: partition seq_len(M) into n contiguous blocks, as even as possible (earlier shards get the +1 when M is not divisible by n).

Usage

.ggmlr_batch_shards(M, n)

Arguments

M

Number of rows (batch size).

n

Number of shards.

Value

A list of integer vectors of row indices (1-based), length n; empty vectors are dropped.


ggmlR documentation built on July 14, 2026, 1:08 a.m.