NLA-lib Explorer

NLAlib.Ops.StoredDense.stmtCost_impl

Library · theorem

Each row initializes zero, then executes one multiplication and addition per entry. Canonical execution additionally charges all indexing, addressing, frames and control.

NLAlib.Ops.StoredDense.stmtCost_impl {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  (m n dataOff xOff yOff : ℕ) :
  Ops.stmtCost Ops.StoredDense.impl [m, n, dataOff, xOff, yOff] =
    m •
      (Ops.Count.one (Ops.Has.inj (Ops.ScalarOp.lit 0)) [] +
        n •
          (Ops.Count.one (Ops.Has.inj Ops.ScalarOp.mul) [] +
            Ops.Count.one (Ops.Has.inj Ops.ScalarOp.add) []))

Full source on GitHub

Import NLAlib.Ops.Profiles.StoredDense.