NLAlib.Ops.RCLikeBlas.writes_axpy
Library ยท theorem
An axpy call writes the exact vector update after reading all three input blocks.
NLAlib.Ops.RCLikeBlas.writes_axpy {๐ Op Tst : Type} [RCLike ๐] [Ops.Has Ops.Blas1Op Op]
{I : Ops.Interp Op Tst ๐} {ฯ : Ops.Tape ๐} {ฯ : Ops.Env} {m : Ops.Mem ๐}
(hI : Ops.RCLikeBlas.IsExact I) {ds : List Ops.IExp} {ins outs : List Ops.Operand} {n : โ}
{a x y z : โ ร โ} {alpha : ๐} {xs ys : List ๐} (hd : Ops.IExp.evalList ฯ.idx ds = some [n])
(ha : Ops.Operand.evalList ฯ ins = some [a, x, y]) (hz : Ops.Operand.evalList ฯ outs = some [z])
(hl : m.Live [a, x, y, z]) (hA : m.store.readBlock a.1 a.2 1 = some [alpha])
(hX : m.store.readBlock x.1 x.2 n = some xs) (hY : m.store.readBlock y.1 y.2 n = some ys)
(hAZ : Ops.Fp.Disj (Ops.Store.inBlock a.1 a.2 1) (Ops.Store.inBlock z.1 z.2 n))
(hXZ : Ops.Fp.Disj (Ops.Store.inBlock x.1 x.2 n) (Ops.Store.inBlock z.1 z.2 n) โจ x = z)
(hYZ : Ops.Fp.Disj (Ops.Store.inBlock y.1 y.2 n) (Ops.Store.inBlock z.1 z.2 n) โจ y = z)
(hZ : z.2 + n โค m.store.len z.1) :
Ops.Writes Ops.Mode.total I ฯ (Ops.Stmt.call (Ops.Has.inj Ops.Blas1Op.axpy) ds ins outs) ฯ
(Ops.Store.inBlock z.1 z.2 n)
(fun m' โฆ
m'.pos = m.pos โง
m'.store.readBlock z.1 z.2 n =
some (List.ofFn fun i โฆ ys.getD (โi) 0 + alpha * xs.getD (โi) 0))
mImport NLAlib.Ops.Logic.RCLikeBlas.