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 / checks / arest-gargs.om

26 lines · 665 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-gargs.om: argargs (gpu/nvidia/om/apirest/gargs.om); Q is the 5 words of va and the 2 of sc (va view ulong 5 and sc view uint 2), the output its first NY words. Composed before arest.om.
3text t_name "AREST-GARGS"
4text t_au "gargs"
5fn arop q view ulong 64 nq ulong ny ulong o edit ulong 128 to ulong
6if ne nq 7
7ckbad
8end
9va = new ulong 5 0
10for i ulong 5
11put va i get q i
12end
13sc = new uint 2 0
14for i ulong 2
15if gt get q add 5 i 4294967295
16ckbad
17end
18put sc i uint get q add 5 i
19end
20y = new uint 64 0x5a5a5a5a
21r = argargs va sc part y 0 ny
22for i ulong ny bound 64
23put o i ulong get y i
24end
25ret r
26end