NLA-lib Explorer

NLAlib.Ops.RCLikeScalar.dotWithScratch_writes

Library ยท theorem

The explicit conjugate-product loop computes the Hermitian dot product with one caller-owned temporary. Both input blocks remain outside its two written scalar cells. A fragment of the tree NLAlib.Ops.RCLikeScalar.dot.

NLAlib.Ops.RCLikeScalar.dotWithScratch_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.StarOp Op] {๐•œ : Type} [RCLike ๐•œ] {I : Ops.Interp Op Tst ๐•œ} {tape : Ops.Tape ๐•œ}
  {m : Ops.Mem ๐•œ} (hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (hStar : Ops.RCLikeStar.IsExact I)
  {n : โ„•} {x y t out : โ„• ร— โ„•} (xs ys : List ๐•œ) (hl : m.Live [x, y, t, out])
  (hX : m.store.readBlock x.1 x.2 n = some xs) (hY : m.store.readBlock y.1 y.2 n = some ys)
  (hDX :
    (Ops.Store.inBlock t.1 t.2 1 โŠ” Ops.Store.inBlock out.1 out.2 1).Disj
      (Ops.Store.inBlock x.1 x.2 n))
  (hDY :
    (Ops.Store.inBlock t.1 t.2 1 โŠ” Ops.Store.inBlock out.1 out.2 1).Disj
      (Ops.Store.inBlock y.1 y.2 n))
  (hTO : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock out.1 out.2 1))
  (ht : t.2 + 1 โ‰ค m.store.len t.1) (ho : out.2 + 1 โ‰ค m.store.len out.1) :
  Ops.Writes Ops.Mode.total I tape Ops.RCLikeScalar.dotWithScratch
    (Ops.Env.frame [n] [x, y, t, out])
    (Ops.Store.inBlock t.1 t.2 1 โŠ” Ops.Store.inBlock out.1 out.2 1)
    (fun m' โ†ฆ m'.pos = m.pos โˆง m'.store.readBlock out.1 out.2 1 = some [Ops.RCLikeBlas.dot n xs ys])
    m

Full source on GitHub

Import NLAlib.Ops.Profiles.RCLikeScalarTrees.