mapChunks

fnauto mapChunks(alias kernel, Args...)(const ArrayData[] chunks, Args args)

Applies a kernel chunk-wise over an array of chunks, producing one result chunk per input chunk. Series operations are composed through this helper; above the row threshold and with a second thread available it runs as a std.parallelism map over the owned pool (ADR-2026-10-19-02). Race-free because chunks are immutable (D15), deterministic because each result slot is written by exactly one task (the output is bitwise-identical to the serial loop whatever the scheduling); worker exceptions rethrow on the calling thread.

Parameters

kernela module-level template with a Kind value parameter that takes a const ArrayData plus extra arguments and returns an ArrayData
chunksthe input chunks (the dtype of the first selects the kind; the caller validates uniformity)
argsforwarded by value to the kernel

Returns

the result chunks, one per input chunk.