NLA-lib Explorer

NLAlib.Ops.StoredDense.apply_writes_word

Library ยท theorem

The streamed dense body returns all rows with one caller-owned temporary. The input matrix and vector may overlap each other; both remain separate from output and temporary. Shared by the trees of NLAlib.Deflation.program, NLAlib.ShiftedQR.deflationInputs, NLAlib.ShiftedQR.factorCoefficients and 2 more.

NLAlib.Ops.StoredDense.apply_writes_word {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {๐•œ : Type}
  [RCLike ๐•œ] {I : Ops.Interp Op Tst ๐•œ} {tape : Ops.Tape ๐•œ} {mem : Ops.Mem ๐•œ} {M : Ops.Machine ๐•œ}
  (hS : Ops.IsScalar M I) {m n : โ„•} {data x t y : โ„• ร— โ„•} (ds xs : List ๐•œ)
  (hl : mem.Live [data, x, t, y]) (hD : mem.store.readBlock data.1 data.2 (m * n) = some ds)
  (hX : mem.store.readBlock x.1 x.2 n = some xs)
  (hYD : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 m) (Ops.Store.inBlock data.1 data.2 (m * n)))
  (hYX : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 m) (Ops.Store.inBlock x.1 x.2 n))
  (hTD : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock data.1 data.2 (m * n)))
  (hTX : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock x.1 x.2 n))
  (hTY : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock y.1 y.2 m))
  (ht : t.2 + 1 โ‰ค mem.store.len t.1) (hy : y.2 + m โ‰ค mem.store.len y.1) :
  Ops.Writes Ops.Mode.total I tape Ops.StoredDense.apply (Ops.Env.frame [m, n] [data, x, t, y])
    (Ops.Store.inBlock y.1 y.2 m โŠ” Ops.Store.inBlock t.1 t.2 1)
    (fun mem' โ†ฆ
      mem'.pos = mem.pos โˆง
        mem'.store.readBlock y.1 y.2 m =
          some (List.map (Ops.StoredDense.rowWord M m n ds xs) (List.range m)))
    mem

Full source on GitHub

Import NLAlib.Ops.Profiles.StoredDense.