pub fn gdn_fold(
fp: FpUnit,
q: &[f32],
log: &[Logged<'_>],
width: usize,
) -> (Vec<f32>, Vec<f32>)Expand description
A query folded back through a lazily flushed head’s log, newest token first: per token, its gate times the key’s
dot with the folded query; that coefficient times the token’s values collected into width sums; the query decayed
past the token’s update, y ← decay·(y − coef·k). Returns the folded query and the collected values.