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-xnext.om

44 lines · 1125 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-xnext.om: arxnext (gpu/nvidia/om/apirest/xnext.om), as state_parts() of CUDApp
3note tests/api_rest_partitions.h calls it in a loop. Q a flag, 16 q words, 5 rows, 3 have bytes: with flag 0 q and
4note have are the row's, with flag 1 they are what the previous row left, as the test's loop carries them. q after
5note the call is output 129 on (128 + its place in Q). Composed before arestg.om.
6text t_name "AREST-XNEXT"
7text t_xnext "xnext"
8global ax_xq ulong 16
9global ax_xh uchar 3
10fn arop q view ulong 256 nq ulong ny ulong o edit ulong 256 to ulong
11if or ne nq 25 not ckis 0 t_xnext
12ckbad
13end
14a = new ulong 16 0
15have = new uchar 3 0
16if eq get q 0 0
17for i ulong 16
18put a i get q add 1 i
19end
20for i ulong 3
21put have i uchar get q add 22 i
22end
23else
24for i ulong 16
25put a i get ax_xq i
26end
27for i ulong 3
28put have i get ax_xh i
29end
30end
31rows = new uint 5 0
32for i ulong 5
33put rows i uint get q add 17 i
34end
35r = arxnext a part rows 0 5 part have 0 3
36for i ulong 16
37put ax_xq i get a i
38put o add 129 i get a i
39end
40for i ulong 3
41put ax_xh i get have i
42end
43ret r
44end