Skip to main content

emit_spatial_zip_sum_test

Function emit_spatial_zip_sum_test 

Source
pub fn emit_spatial_zip_sum_test(
    n: usize,
    columns: &[ZipColumn],
    term: &ZipTerm,
    p: ZipPar,
    class_name: &str,
) -> Result<String, String>
Expand description

Emit a Spatial REGRESSION-HARNESS zip sum Σ_{t<n} f(c₀[t], c₁[t], …) with the structure of Spatial’s own reduce-over-tiles apps (DotProduct, TPCHQ6): a ts-element tile of every column loaded in parallel, op tiles reduced at once, each tile’s sum an ip-lane Reduce of the term (the body of spatial.lib.ML.sum_flat) — at our length, over the program’s own column data, so the app’s gold is the LOGOS program’s answer. The app computes in Spatial’s 32-bit Int, as the regression apps do; a sum that would wrap there (where the VM’s 64-bit Int does not) is refused, as is a tile that does not divide the length or a reduce wider than its tile.