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

30 lines · 788 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-victim.om: arvictim (gpu/nvidia/om/apirest/victim.om); Q is its 8 q words and 17 records of 8 bytes as in arest-cache.om; q after the call is output 64 on. Composed before arest.om.
3text t_name "AREST-VICTIM"
4text t_au "victim"
5note the 17 records from word s of q, 8 bytes each, little-endian
6fn arrec q view ulong 64 s ulong x edit uchar 136 to void
7for i ulong 17
8w = get q add s i
9c = mul i 8
10for b ulong 8
11put x add c b uchar and shr w mul b 8 255
12end
13end
14end
15fn arop q view ulong 64 nq ulong ny ulong o edit ulong 128 to ulong
16if or ne nq 25 ne ny 0
17ckbad
18end
19a = new ulong 8 0
20for i ulong 8
21put a i get q i
22end
23x = new uchar 136 0
24arrec q 8 x
25r = arvictim a x
26for i ulong 8
27put o add 64 i get a i
28end
29ret r
30end