Skip to main content

from_row_gather

Function from_row_gather 

Source
pub fn from_row_gather(
    spec: &RowGatherSpec,
    names: &StageNames,
    float: bool,
    dense: bool,
    target: &SpatialTarget,
) -> Result<SpatialProgram, SpatialReject>
Expand description

x[j] = T[lo + j] — the embedding lookup: row index (1-based) of a flat rows·cols table.

★ THE ROW IS DATA. A named index is an operand: its flat offset lo = (index − 1)·cols is computed on the integer datapath and the gather reads T through an IndirectTerm of extent rows·cols — so a token id past the table (or below 1: lo < 0) FAULTS in the evaluator, exactly where every tier’s run-time check fails, and is never wrapped into somebody else’s row.

dense: the table is laid out as a matrix, a tile row holding tile rows — see dense_row_gather.