interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / gpu / nvidia / om / api / attn_rows.om

29 lines · 606 bytes Raw Blame History
1om2
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note Inner traversal blocks preserve the checked one-million-iteration guard.
4fn vc_rows d edit uint * q view ulong 4 base ulong to ulong
5for zzj ulong get q 1
6i = add get q 0 zzj
7put d i uint 0
8v = and add add base i 1 4294967295
9put d add get q 2 i uint v
10end
11ret 0
12end
13
14fn av_rows d edit uint * n ulong base ulong to ulong
15q = new ulong 4 0
16r = ulong 0
17for zzb ulong add div n 1000000 1
18put q 0 mul zzb 1000000
19zzn = sub n get q 0
20if gt zzn 1000000
21zzn = ulong 1000000
22end
23put q 1 zzn
24put q 2 n
25rr = vc_rows d q base
26r = rr
27end
28ret r
29end