NLA-lib Explorer

NLAlib.Krylov.CG.HSPCG.Rounded.cache_writes

Library · theorem

Relative-error BLAS

Refresh the stopping cache with the actual functional rounded dot. The four vectors are preserved, and both the numerical bound and deterministic computed word are retained.

A fragment of NLAlib.Krylov.CG.HSPCG.Rounded.solveRoutine, not a routine: it writes the stopping-cache cell that solve allocates.

NLAlib.Krylov.CG.HSPCG.Rounded.cache_writes {Op Tst : Type} [Ops.Has Ops.Blas1Op Op]
  {F : Ops.Machine ℝ} {ε : Ops.Blas1Err} {ok : ℕ → Prop} {n : ℕ} {I : Ops.Interp Op Tst ℝ}
  (hB : Ops.IsBlas1 id ε ok I) (hok : ok n)
  (hD :
    I.IsFn Ops.Mode.total (Ops.Has.inj Ops.Blas1Op.dot) (Ops.dotSeqFn F)
      (Ops.OutApart fun x ↦ True))
  {τ : Ops.Tape ℝ} {μ : Ops.Mem ℝ} {ρ : Ops.Env} {ds : List Ops.IExp} {ins outs : List Ops.Operand}
  {x r z p v : ℕ × ℕ} {s : PCGState ℝ (Fin n)} (hd : Ops.IExp.evalList ρ.idx ds = some [n])
  (hi : Ops.Operand.evalList ρ ins = some [r, z]) (ho : Ops.Operand.evalList ρ outs = some [v])
  (hxv : x.1 ≠ v.1) (hrv : r.1 ≠ v.1) (hzv : z.1 ≠ v.1) (hpv : p.1 ≠ v.1) (hl : μ.Live [r, z, v])
  (hs : Krylov.CG.HSPCG.StoresState id n x r z p s μ) (hv : v.2 < μ.store.len v.1) :
  Ops.Writes Ops.Mode.total I τ (Ops.Stmt.call (Ops.Has.inj Ops.Blas1Op.dot) ds ins outs) ρ
    (Ops.Store.inBlock v.1 v.2 1)
    (fun ν ↦
      ν.pos = μ.pos ∧
        ∃ rho,
          Krylov.CG.HSPCG.Rounded.StoresCached n x r z p v s rho ν ∧
            |rho - s.r ⬝ᵥ s.z| ≤ ε.dot n * ∑ i, |s.r i * s.z i| ∧
              rho = Krylov.CG.HSPCG.Rounded.pairingValue F s.r s.z)
    μ

Full source on GitHub

Import NLAlib.Krylov.CG.HSPCG.Rounded.State.