NLAlib.copyStrided_writes_rect
Library · theorem
Copying a dense block into a rectangular block on a scalar machine and every tape: NLAlib.Ops.copyStrided with m rows, q columns, the source leading dimension m and the destination leading dimension N, from \mathbf{B} stored densely at w into the view of offset 2(c_0 N + r_0) of the square matrix \mathbf{A} of order N stored at a, writes only the words of that block and leaves NLAlib.setRect. Shared by the trees of NLAlib.ShiftedQR.copyToWork, NLAlib.ShiftedQR.copyToGlobal, NLAlib.ShiftedQR.roundedLeafUpdate.
NLAlib.copyStrided_writes_rect {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {M : Ops.Machine ℝ}
{I : Ops.Interp Op Tst ℝ} (hS : Ops.IsScalar M I) {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ}
{N r0 c0 m q : ℕ} {a w : ℕ × ℕ} {A : Matrix (Fin N) (Fin N) ℂ} {B : Matrix (Fin m) (Fin q) ℂ}
(hl : μ.Live [w, a]) (hA : HoldsMatrix a A μ.store) (hB : HoldsMatrix w B μ.store)
(hr : r0 + m ≤ N) (hc : c0 + q ≤ N) (ha : a.2 + 2 * (N * N) ≤ μ.store.len a.1)
(hd :
Ops.Fp.Disj (Ops.Store.inBlock w.1 w.2 (2 * (q * m)))
(Ops.Store.inBlock a.1 a.2 (2 * (N * N)))) :
Ops.Writes Ops.Mode.total I τ Ops.copyStrided
(Ops.Env.frame [m, q, m, N] [w, (a.1, a.2 + 2 * (c0 * N + r0))])
((Ops.EntryCodec.pair ℝ).regionFp a.1 (a.2 + 2 * (c0 * N + r0)) q (fun i j ↦ j * N + i) fun x ↦
m)
(fun μ' ↦ μ'.pos = μ.pos ∧ HoldsMatrix a (setRect A r0 c0 B) μ'.store) μImport NLAlib.Matrix.FinitePrecision.StoredBlocks.