NLAlib.Ops.ContextDense.impl_writes
Library · theorem
Context forwarding preserves the actual dense execution and its output footprint. No abstract matrix-vector call is executed by this leaf. Shared by the trees of NLAlib.Ops.Examples.splitTable, NLAlib.Ops.Blas.level1Table, NLAlib.Ops.Blas.sumSeqTable and 8 more.
NLAlib.Ops.ContextDense.impl_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
{I : Ops.Interp Op Tst ℝ} {tape : Ops.Tape ℝ} {mem : Ops.Mem ℝ}
(hS : Ops.IsScalar Ops.RCLikeBlas.machine I) (context : List (ℕ × ℕ)) (index : Fin context.length)
{m n : ℕ} {x y : ℕ × ℕ} (ds xs : List ℝ) (hl : mem.Live (context ++ [x, y]))
(hD : mem.store.readBlock context[index].1 context[index].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 context[index].1 context[index].2 (m * n)))
(hYX : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 m) (Ops.Store.inBlock x.1 x.2 n))
(hy : y.2 + m ≤ mem.store.len y.1) :
Ops.Writes Ops.Mode.total I tape (Ops.ContextDense.impl context.length ↑index).body
(Ops.Env.frame [m, n] (context ++ [x, y])) (Ops.Store.inBlock y.1 y.2 m)
(fun mem' ↦
mem'.pos = mem.pos ∧
mem'.store.readBlock y.1 y.2 m =
some (List.map (Ops.StoredDense.row m n ds xs) (List.range m)))
memImport NLAlib.Ops.Profiles.ContextDense.