NLAlib.Ops.Blas.pairwise_cost_dot
Library · theorem
The cost of dot in the profile of pairwise summation of depth k, for ⌈log₂ n⌉ < k: n multiplications, n copies and n - 1 additions.
NLAlib.Ops.Blas.pairwise_cost_dot {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.dot) [n] =
n • Ops.Blas.sc Ops.ScalarOp.mul + Ops.Blas.pairCount nImport NLAlib.Ops.Profiles.BlasCert.