Skip to main content

emit_spatial_gda_test

Function emit_spatial_gda_test 

Source
pub fn emit_spatial_gda_test(
    rows: usize,
    cols: usize,
    columns: &[GdaColumn],
    term: &ZipTerm,
    p: GdaPar,
    class_name: &str,
) -> Result<String, String>
Expand description

Emit a Spatial REGRESSION-HARNESS scatter accumulation S = Σ_{r<R} d_r d_rᵀ (C × C) with the structure of Spatial’s own GDA app — the column-axis arrays loaded once, a MemReduce over ts-row tiles of the row-axis arrays and of the row-major data, inside it a MemReduce over the tile’s rows that computes each row’s d into subTile and its outer product into sigmaTile — at our shape, over the program’s own data. The app computes in Spatial’s 32-bit Int; 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 rows.