NLA-lib Explorer

NLAlib.Ops.original_stmtCost_axpyLoop

Library · theorem

The complete instrumented axpy tree still has exactly n multiplications and n additions. This projects its static count; structural instructions remain in the full count.

NLAlib.Ops.original_stmtCost_axpyLoop (n a x y z : ℕ) :
  Ops.Count.original
      (Ops.stmtCost Ops.axpyLoop.instrument
        (Ops.Env.frame [n] [(0, a), (1, x), (2, y), (2, z)]).idx) =
    n • (Ops.Count.one Ops.ScalarOp.mul [] + Ops.Count.one Ops.ScalarOp.add [])

Full source on GitHub

Import NLAlib.Ops.Blas.Mixed.