interplane.Get Omega
Read in your language

ggml-omega

aien-dev/ggml-omega

Brought by drakestapleton

branch main Branches Tags History

ggml-omega / kernels / scl.om

12 lines · 300 bytes Raw Blame History
1note scl_@T@: d = x*s + b on @T@ f32 lanes (s, b f32 bits); b 0 gives the plain x*s of ggml_vec_scale_f32.
2fn scl_@T@ x view f32 @T@ d edit f32 @T@ s ulong b ulong to void
3sf = bitcast f32 uint s
4bf = bitcast f32 uint b
5for i ulong @T@
6v = mul get x i sf
7if ne b 0
8v = add v bf
9end
10put d i v
11end
12end