NLA-lib Explorer

NLAlib.Ops.Blas.pairwise_cost_nrm2

Library · theorem

The costs of the other operations in the profile of pairwise summation of depth k, for ⌈log₂ n⌉ < k.

NLAlib.Ops.Blas.pairwise_cost_nrm2 {Op Tst : Type} [Ops.Has Ops.ScalarOp Op]
  [Ops.Has Ops.Blas1Op Op] [Ops.Apart Ops.Blas1Op Ops.ScalarOp Op] (k n : ℕ)
  (h : Nat.clog 2 n < k) :
  (Ops.Blas.pairwise k).cost (Ops.Has.inj Ops.Blas1Op.nrm2) [n] =
    n • Ops.Blas.sc Ops.ScalarOp.mul + (Ops.Blas.pairCount n + Ops.Blas.sc Ops.ScalarOp.sqrt)

Full source on GitHub

Import NLAlib.Ops.Profiles.BlasCert.