omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / bridge / ggml / kernels / sexp.om
| 1 | note sexp_@T@: w[i] = f32 exp(w[i] - max) in place; returns acc (f64 bits) + the sum of the new w[i]. |
| 2 | fn sexp_@T@ acc ulong w edit f32 @T@ mx ulong to ulong |
| 3 | s = bitcast f64 acc |
| 4 | mf = bitcast f32 uint mx |
| 5 | for i ulong @T@ |
| 6 | v = f32 ex64 f64 sub get w i mf |
| 7 | put w i v |
| 8 | s = add s f64 v |
| 9 | end |
| 10 | ret bitcast ulong s |
| 11 | end |