Skip to main content

agreement_count

Function agreement_count 

Source
pub fn agreement_count(
    df: &mut DramDataflow,
    a: &[usize],
    b: &[usize],
    out_width: usize,
    zero: usize,
) -> Vec<usize>
Expand description

Per-lane AGREEMENT COUNT popcount(a XNOR b) — the binary / 1-bit neural-net DOT PRODUCT. For ±1 codes packed as bits, the true dot product is 2·agreements − K; the agreement count is the in-DRAM half (XNOR + popcount, no multiply), the final affine map is a scalar host step.