NativeBatchLayout
The row layout of a Native batch function (field-presentation §FVK-10, matrix FVW-82).
In the namespace eval::internal. Declared in src/libs/libeval/eval/SpirvLane.hpp.
Detailed description
The batch function is a second function in the JIT module of a program. It loops over `count` rows inside the JIT code. Per row, it copies each input slot from the caller's packed row into the entry's input buffer, calls `eval_main`, and copies each output slot from the entry's output buffer into the caller's packed row. The two buffers are zero once per call and live for the whole call, as in `Program::evaluateBatch`'s per-row path, so the results are the same bits.
The call to `eval_main` carries `alwaysinline`, so LLVM's O2 pipeline (`Graph::optimizeNative`) puts the kernel into the loop, and SROA then takes the two buffers into registers.
Only for a program with plain slots (nativeBatchSlotWidth not 0), no wide output and no runtime array. `Graph` makes no layout for any other program, and that program keeps the per-row path.