NLA-lib Explorer

NLAlib.HutchPlusPlus.evaluate_writes

Library ยท theorem

The actual operator batch and trace contractions return hutchpp on the supplied sketch and probes. All workspaces are explicit, with ordinary capacity and separation premises. A fragment of NLAlib.HutchPlusPlus.estimateRoutine: run only inside its tree, on its operands and the buffers it allocates.

NLAlib.HutchPlusPlus.evaluate_writes {๐•œ Op Tst : Type} [RCLike ๐•œ] [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Ops.Has Ops.IndexOp Op] [Ops.Has Ops.StoredOperatorOp Op]
  {I : Ops.Interp Op Tst ๐•œ} {ฯ„ : Ops.Tape ๐•œ} {m : Ops.Mem ๐•œ}
  (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hB : Ops.RCLikeBlas.IsExact I)
  (hLit : Ops.IsIndexLit Ops.RCLikeBlas.machine I) {dataLength : โ„• โ†’ โ„• โ†’ โ„•}
  {matrix : (m n : โ„•) โ†’ List ๐•œ โ†’ Matrix (Fin m) (Fin n) ๐•œ}
  (hI : Ops.StoredOperator.IsExact dataLength matrix I) {n k ell : โ„•} {data b t c out : โ„• ร— โ„•}
  (as : List ๐•œ) (S : Matrix (Fin n) (Fin k) ๐•œ) (G : Matrix (Fin n) (Fin ell) ๐•œ)
  (hl : m.Live [data, b, t, c, out])
  (hAP : Ops.Fp.Apart [data, b, t, c, out] [dataLength n n, (k + ell) * n, 2, (k + ell) * n, 1])
  (hA : m.store.readBlock data.1 data.2 (dataLength n n) = some as)
  (hBInput :
    m.store.readBlock b.1 b.2 ((k + ell) * n) =
      some
        ((Ops.EntryCodec.scalar ๐•œ).packFinMatrix
          (HutchPlusPlus.projectedBasis (gramSchmidtQ (matrix n n as * S)) G)))
  (ht : t.2 + 2 โ‰ค m.store.len t.1) (hc : c.2 + (k + ell) * n โ‰ค m.store.len c.1)
  (ho : out.2 + 1 โ‰ค m.store.len out.1) :
  Ops.Writes Ops.Mode.total I ฯ„ HutchPlusPlus.evaluate
    (Ops.Env.frame [n, k, ell] [data, b, t, c, out])
    (Ops.Store.inBlock c.1 c.2 ((k + ell) * n) โŠ”
      (Ops.Store.inBlock t.1 t.2 2 โŠ” 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])
    m

Full source on GitHub

Import NLAlib.Estimation.Trace.HutchPlusPlus.Evaluate.