NLA-lib Explorer

NLAlib.Ops.Tools.profileProgram_memory

Library · theorem

Resident payload bytes use exactly the declared problem's initially supplied buffers.

NLAlib.Ops.Tools.profileProgram_memory {Op Tst K : Type} {r b : ℕ} {P : Ops.Problem K r b}
  (p : Ops.Program Op Tst r b) (I : Ops.Interp Op Tst K) (R : Ops.ResourceModel Op Tst)
  (τ : Ops.Tape K) (d : Fin r → ℕ) (x : P.Input d) :
  (Ops.Tools.profileProgram p I R P.formats τ d (P.initial d x)).memory =
    Option.map (fun st ↦ P.initialBytes d x + st.peak)
      (Ops.exec p I R P.formats τ d (P.initial d x))

Full source on GitHub

Import NLAlib.Ops.Tools.Program.