NLAlib.Ops.RCLikeScalar.axpy_writes
Library ยท theorem
One scoped product cell implements axpy for disjoint or exactly aliased vector views. The broadcast scalar remains outside the output; scratch is removed before returning. The tree implements axpy for four operand layouts, four routines (axpyRoutine, axpyInPlaceRoutine, axpyOnXRoutine, axpySelfRoutine); this lemma, stated for every layout, is their common proof. Shared by the trees of NLAlib.Krylov.CG.HSCG.step, NLAlib.Krylov.CG.HSCG.initializeState, NLAlib.Krylov.CG.HSCG.initializeRoutine and 26 more.
NLAlib.Ops.RCLikeScalar.axpy_writes {Op Tst : Type} [Ops.Has Ops.ScalarOp Op] {๐ : Type} [RCLike ๐]
{I : Ops.Interp Op Tst ๐} {tape : Ops.Tape ๐} {m : Ops.Mem ๐}
(hS : Ops.IsScalar Ops.RCLikeBlas.machine I) {n : โ} {a x y out : โ ร โ} (xs ys : List ๐)
(alpha : ๐) (hl : m.Live [a, x, y, out]) (hA : m.store.get a.1 a.2 = some alpha)
(hX : m.store.readBlock x.1 x.2 n = some xs) (hY : m.store.readBlock y.1 y.2 n = some ys)
(hXO : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock out.1 out.2 n) โจ x = out)
(hYO : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 n) (Ops.Store.inBlock out.1 out.2 n) โจ y = out)
(hAO : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 1) (Ops.Store.inBlock out.1 out.2 n))
(ho : out.2 + n โค m.store.len out.1) :
Ops.Writes Ops.Mode.total I tape Ops.RCLikeScalar.axpy (Ops.Env.frame [n] [a, x, y, out])
(Ops.Store.inBlock out.1 out.2 n)
(fun m' โฆ
m'.pos = m.pos โง
m'.store.readBlock out.1 out.2 n =
some (List.ofFn fun i โฆ ys.getD (โi) 0 + alpha * xs.getD (โi) 0))
mImport NLAlib.Ops.Profiles.RCLikeScalarTrees.