NLAlib.Ops.RCLikeScalar.axpyWithScratch_writes
Library ยท theorem
The pointwise scalar axpy follows the original input words through the output prefix. Each vector may alias the output exactly; the broadcast scalar remains separate. A fragment of the tree NLAlib.Ops.RCLikeScalar.axpy.
NLAlib.Ops.RCLikeScalar.axpyWithScratch_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 t out : โ ร โ} (xs ys : List ๐)
(alpha : ๐) (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))
(hTX : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock x.1 x.2 n))
(hTY : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock y.1 y.2 n))
(hTA : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock a.1 a.2 1))
(hTO : Ops.Fp.Disj (Ops.Store.inBlock t.1 t.2 1) (Ops.Store.inBlock out.1 out.2 n))
(ht : t.2 + 1 โค m.store.len t.1) (ho : out.2 + n โค m.store.len out.1) :
Ops.Writes Ops.Mode.total I tape Ops.RCLikeScalar.axpyWithScratch
(Ops.Env.frame [n] [a, x, y, t, out])
(Ops.Store.inBlock out.1 out.2 n โ Ops.Store.inBlock t.1 t.2 1)
(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.