NLAlib.HutchPlusPlus.accumulate_writes
Library ยท theorem
The explicit accumulation returns the low-rank sum plus the mean residual sum. Input blocks are read from actual columns and retained through disjoint scalar writes. A fragment of NLAlib.HutchPlusPlus.estimateRoutine: run only inside its tree, on its operands and the buffers it allocates.
NLAlib.HutchPlusPlus.accumulate_writes {๐ Op Tst : Type} [RCLike ๐] [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.IndexOp Op] {I : Ops.Interp Op Tst ๐} {ฯ : Ops.Tape ๐}
{m : Ops.Mem ๐} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
(hLit : Ops.IsIndexLit Ops.RCLikeBlas.machine I) {n k ell : โ} {b c t out : โ ร โ}
(xs ys : โ โ List ๐) (hl : m.Live [b, c, t, out])
(hX : โ j < k + ell, m.store.readBlock b.1 (b.2 + n * j) n = some (xs j))
(hY : โ j < k + ell, m.store.readBlock c.1 (c.2 + n * j) n = some (ys j))
(hDX :
โ j < k + ell,
(Ops.Store.inBlock t.1 t.2 2 โ Ops.Store.inBlock out.1 out.2 1).Disj
(Ops.Store.inBlock b.1 (b.2 + n * j) n))
(hDY :
โ j < k + ell,
(Ops.Store.inBlock t.1 t.2 2 โ Ops.Store.inBlock out.1 out.2 1).Disj
(Ops.Store.inBlock c.1 (c.2 + n * j) n))
(hTO : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 2) (Ops.Store.inBlock out.1 out.2 1))
(ht : t.2 + 2 โค m.store.len t.1) (ho : out.2 + 1 โค m.store.len out.1) :
Ops.Writes Ops.Mode.total I ฯ HutchPlusPlus.accumulate (Ops.Env.frame [n, k, ell] [b, c, t, out])
(Ops.Store.inBlock t.1 t.2 2 โ Ops.Store.inBlock out.1 out.2 1)
(fun m' โฆ
m'.pos = m.pos โง
m'.store.readBlock out.1 out.2 1 =
some
[โ j โ Finset.range k, Ops.RCLikeBlas.dot n (xs j) (ys j) +
(โ j โ Finset.range ell, Ops.RCLikeBlas.dot n (xs (k + j)) (ys (k + j))) / โell])
mImport NLAlib.Estimation.Trace.HutchPlusPlus.Accumulate.