NLAlib.MGS.factorWithScratch_writes
Library Β· theorem
The full rank-revealing column loop computes the existing mathematical gramSchmidtQ for every matrix, using caller-owned disjoint scalar workspace. A fragment of NLAlib.MGS.factorRoutine: run only inside its tree, on its operands and the buffers it allocates.
NLAlib.MGS.factorWithScratch_writes {π Op Tst : Type} [RCLike π] [Ops.Has Ops.ScalarOp Op]
[Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.CmpTst Tst] {I : Ops.Interp Op Tst π} {Ο : Ops.Tape π}
{m : Ops.Mem π} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
(hC : Ops.IsCmp (βRCLike.re) I) {n k : β} (A : Matrix (Fin n) (Fin k) π) {y t : β Γ β}
(hl : m.Live [y, t])
(hA : m.store.readBlock y.1 y.2 (k * n) = some ((Ops.EntryCodec.scalar π).packFinMatrix A))
(hty : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 2) (Ops.Store.inBlock y.1 y.2 (k * n)))
(ht : t.2 + 2 β€ m.store.len t.1) (hy : y.2 + k * n β€ m.store.len y.1) :
Ops.Writes Ops.Mode.total I Ο MGS.factorWithScratch (Ops.Env.frame [n, k] [y, t])
(Ops.Store.inBlock y.1 y.2 (k * n) β Ops.Store.inBlock t.1 t.2 2)
(fun m' β¦
m'.pos = m.pos β§
m'.store.readBlock y.1 y.2 (k * n) =
some ((Ops.EntryCodec.scalar π).packFinMatrix (gramSchmidtQ A)))
mImport NLAlib.Matrix.Factorizations.MGS.Factor.