Skip to main content

score_pattern_flat

Function score_pattern_flat 

Source
pub fn score_pattern_flat(
    layout: &NaryPatternBatchLayout,
    pattern_index: usize,
    candidates: &[FlatRelation],
    example: &[u64],
) -> bool
Expand description

Score ONE pattern of the batch against one example tuple — the exact iterative walk the device kernel runs, in host Rust.

State per depth (= body atom index): the row cursor and the bitmask of join variables that depth’s row newly bound. Join VALUES live in one array; a value is meaningful only while its bit is set in bound. Backtracking clears the depth’s mask and advances its cursor — never touching values bound by shallower depths.