interplane.Get Omega
Read in your language

openaccel-lab

aien-dev/openaccel-lab

Brought by drakestapleton

branch main Branches Tags History

openaccel-lab / controls / reduce_drop_last / omega.om

26 lines · 389 bytes Raw Blame History
1note CONTROL (deliberately wrong): sums x[0..n-2] only, dropping the last element.
2global kn ulong 1
3fn kern to void
4s = 0.0f32
5for i ulong sub get kn 0 1
6s = add s get fa i
7end
8put fo 0 s
9end
10fn main to int
11oal_begin
12put kn 0 ulong oal_p 0
13a = oal_fa 0
14w = oal_warm
15for i ulong add w oal_reps
16t0 = monons
17kern
18t1 = monons
19if ge i w
20oal_tick sub t1 t0
21end
22end
23oal_so 0 1
24oal_end
25ret 0
26end