NLAlib.Ops.ColumnProducts.sum_writes
Library ยท theorem
Sum the actual column inner products with one caller-owned temporary cell. Readable inputs are retained through the two-cell output footprint, including shared buffers. Shared by the trees of NLAlib.HutchPlusPlus.projectProbes, NLAlib.HutchPlusPlus.accumulate, NLAlib.CGS2.cgs2ExtendFinish and 17 more.
NLAlib.Ops.ColumnProducts.sum_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.Blas1Op Op] {๐ : Type} [RCLike ๐] {I : Ops.Interp Op Tst ๐} {ฯ : Ops.Tape ๐}
{m : Ops.Mem ๐} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
{n k : โ} {x y t out : โ ร โ} (xs ys : โ โ List ๐) (hl : m.Live [x, y, t, out])
(hX : โ j < k, m.store.readBlock x.1 (x.2 + n * j) n = some (xs j))
(hY : โ j < k, m.store.readBlock y.1 (y.2 + n * j) n = some (ys j))
(hDX :
โ j < k,
(Ops.Store.inBlock t.1 t.2 1 โ Ops.Store.inBlock out.1 out.2 1).Disj
(Ops.Store.inBlock x.1 (x.2 + n * j) n))
(hDY :
โ j < k,
(Ops.Store.inBlock t.1 t.2 1 โ Ops.Store.inBlock out.1 out.2 1).Disj
(Ops.Store.inBlock y.1 (y.2 + n * j) n))
(hTO : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock out.1 out.2 1))
(ht : t.2 + 1 โค m.store.len t.1) (ho : out.2 + 1 โค m.store.len out.1) :
Ops.Writes Ops.Mode.total I ฯ Ops.ColumnProducts.sum (Ops.Env.frame [n, k] [x, y, t, out])
(Ops.Store.inBlock t.1 t.2 1 โ 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)])
mImport NLAlib.Ops.Blas.ColumnProducts.