NLAlib.HutchPlusPlus.applyColumns_writes
Library ยท theorem
A batch of local matrix-vector applications computes a matrix product. Read-only operator data and input columns may share a buffer when their spans satisfy the contract. A fragment of NLAlib.HutchPlusPlus.estimateRoutine: run only inside its tree, on its operands and the buffers it allocates.
NLAlib.HutchPlusPlus.applyColumns_writes {๐ Op Tst : Type} [RCLike ๐]
[Ops.Has Ops.StoredOperatorOp Op] {I : Ops.Interp Op Tst ๐} {ฯ : Ops.Tape ๐} {m : Ops.Mem ๐}
{dataLength : โ โ โ โ โ} {matrix : (m n : โ) โ List ๐ โ Matrix (Fin m) (Fin n) ๐}
(hI : Ops.StoredOperator.IsExact dataLength matrix I) {n k : โ} {data x y : โ ร โ} (as : List ๐)
(X : Matrix (Fin n) (Fin k) ๐) (hl : m.Live [data, x, y])
(hA : m.store.readBlock data.1 data.2 (dataLength n n) = some as)
(hX : m.store.readBlock x.1 x.2 (k * n) = some ((Ops.EntryCodec.scalar ๐).packFinMatrix X))
(hYX : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 (k * n)) (Ops.Store.inBlock x.1 x.2 (k * n)))
(hYA :
Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 (k * n))
(Ops.Store.inBlock data.1 data.2 (dataLength n n)))
(hy : y.2 + k * n โค m.store.len y.1) :
Ops.Writes Ops.Mode.total I ฯ HutchPlusPlus.applyColumns (Ops.Env.frame [n, k] [data, x, y])
(Ops.Store.inBlock y.1 y.2 (k * n))
(fun m' โฆ
m'.pos = m.pos โง
m'.store.readBlock y.1 y.2 (k * n) =
some ((Ops.EntryCodec.scalar ๐).packFinMatrix (matrix n n as * X)))
mImport NLAlib.Estimation.Trace.HutchPlusPlus.Apply.