NLA-lib Explorer

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)))
    m

Full source on GitHub

Import NLAlib.Matrix.Factorizations.MGS.Factor.