interplane.Get Omega
Read in your language

ggml-omega

aien-dev/ggml-omega

Brought by drakestapleton

branch main Branches Tags History

ggml-omega / kernels / bin.om

20 lines · 352 bytes Raw Blame History
1note bin_@T@: d = a op b on @T@ f32 lanes; op 0 add, 1 sub, 2 mul, 3 div (one rounding each, as ggml-cpu).
2fn bin_@T@ op ulong a view f32 @T@ b view f32 @T@ d edit f32 @T@ to void
3for i ulong @T@
4x = get a i
5y = get b i
6if eq op 0
7put d i add x y
8else
9if eq op 1
10put d i sub x y
11else
12if eq op 2
13put d i mul x y
14else
15put d i div x y
16end
17end
18end
19end
20end