PrimitiveBuilder.bulkWindow

T[] bulkWindow(size_t n) @safe pure nothrow

Opens a bulk-transform window (the parallel-kernel producer, amending ADR-2026-10-18-07 alongside appendRepeated): reserves n slots at the current end and returns them as a writable window, so a transform kernel's worker segments write their disjoint sub-ranges straight into the output buffer instead of into per-chunk scratch that appendValues would copy again.

The contract: ONE window at a time. The caller fills the window (any number of parallel disjoint writes; a window over n > 0 after a prior window is fine - reserve never moves storage between commits of a closed window), then closes it with exactly one commitBulk call per contiguous run, in order, together covering the window, before any other builder call. The slice aliases builder storage and must not outlive the commits.

Parameters

nthe number of slots the window covers

Returns

the writable window over the next n slots.