NLAlib.HutchPlusPlus.finish_writes
Library ยท theorem
Finish the estimator from its actual prepared basis and probe matrix. Both workspaces are allocated at their source positions and released; no rank assumption is needed. A fragment of NLAlib.HutchPlusPlus.estimateRoutine: run only inside its tree, on its operands and the buffers it allocates.
NLAlib.HutchPlusPlus.finish_writes {๐ Op Tst : Type} [RCLike ๐] [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.StoredOperatorOp Op] [Ops.Has Ops.IndexOp Op]
{I : Ops.Interp Op Tst ๐} {ฯ : Ops.Tape ๐} {dataLength : โ โ โ โ โ}
{matrix : (m n : โ) โ List ๐ โ Matrix (Fin m) (Fin n) ๐}
(hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
(hLit : Ops.IsIndexLit Ops.RCLikeBlas.machine I)
(hI : Ops.StoredOperator.IsExact dataLength matrix I) {n k ell : โ} {data b out : โ ร โ}
{m : Ops.Mem ๐} (as : List ๐) (S : Matrix (Fin n) (Fin k) ๐) (G : Matrix (Fin n) (Fin ell) ๐)
(hl : m.Live [data, b, out])
(hAP : Ops.Fp.Apart [data, b, out] [dataLength n n, (k + ell) * n, 1])
(hA : m.store.readBlock data.1 data.2 (dataLength n n) = some as)
(hInput :
m.store.readBlock b.1 b.2 ((k + ell) * n) =
some
((Ops.EntryCodec.scalar ๐).packFinMatrix
(HutchPlusPlus.basisProbes (gramSchmidtQ (matrix n n as * S)) G)))
(hb : b.2 + (k + ell) * n โค m.store.len b.1) (ho : out.2 + 1 โค m.store.len out.1) :
Ops.Writes Ops.Mode.total I ฯ HutchPlusPlus.finish (Ops.Env.frame [n, k, ell] [data, b, out])
(Ops.Store.inBlock b.1 b.2 ((k + ell) * n) โ Ops.Store.inBlock out.1 out.2 1)
(fun m' โฆ
m'.pos = m.pos โง m'.store.readBlock out.1 out.2 1 = some [hutchpp (matrix n n as) S G])
mImport NLAlib.Estimation.Trace.HutchPlusPlus.Finish.