interplane.Get Omega
Read in your language

openaccel-lab

aien-dev/openaccel-lab

Brought by drakestapleton

branch main Branches Tags History

openaccel-lab / workloads / rope / omega.om

48 lines · 877 bytes Raw Blame History
1note rope: half-split rotary rotation over x[T][H][Dh] with cos/sin tables [T][Dh/2]
2global kt ulong 1
3global kh ulong 1
4global khf ulong 1
5fn pair o ulong cb ulong to void
6note rotate the h pairs of one (t, head) row at x offset o with table offset cb
7hf = get khf 0
8for i ulong hf
9x1 = get fa add o i
10x2 = get fa add add o hf i
11c = get fb add cb i
12s = get fc add cb i
13put fo add o i sub mul x1 c mul x2 s
14put fo add add o hf i add mul x1 s mul x2 c
15end
16end
17fn kern to void
18nh = get kh 0
19hf = get khf 0
20for t ulong get kt 0
21cb = mul t hf
22for j ulong nh
23o = mul add mul t nh j mul 2 hf
24pair o cb
25end
26end
27end
28fn main to int
29oal_begin
30put kt 0 ulong oal_p 0
31put kh 0 ulong oal_p 1
32put khf 0 ulong oal_p 3
33a = oal_fa 0
34b = oal_fb 1
35c = oal_fc 2
36w = oal_warm
37for i ulong add w oal_reps
38t0 = monons
39kern
40t1 = monons
41if ge i w
42oal_tick sub t1 t0
43end
44end
45oal_so 0 a
46oal_end
47ret 0
48end