NLA-lib Explorer

NLAlib.Ops.stmtCost_sampleVector

Library · theorem

A batch executes exactly one primitive draw per stored word.

NLAlib.Ops.stmtCost_sampleVector {Op Tst : Type} [Ops.Has Ops.SampleOp Op] (stream n y : ℕ) :
  Ops.stmtCost (Ops.sampleVector stream) [n, y] =
    n • Ops.Count.one (Ops.Has.inj (Ops.SampleOp.draw stream)) []

Full source on GitHub

Import NLAlib.Ops.Blas.Sampling.