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 / core / graph.om

42 lines · 800 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Copyright 2026 Drake Stapleton
3fn gnew b edit uchar 6648836 p ulong kind ulong to void
4for i ulong 25972
5put b add p i uchar 0
6end
7p = add p 36
8for i ulong 4
9put b add p i uchar and shr kind mul i 8 255
10end
11end
12fn gmatch b view uchar 6648836 id view uchar 32 p ulong to bool
13if eq get b add p 32 uchar 0
14ret false
15end
16for i ulong 32
17if ne get b add p i get id i
18ret false
19end
20end
21ret true
22end
23fn omgraph b edit uchar 6648836 id view uchar 32 kind ulong mode ulong to ulong
24n = or ulong get b 0 shl ulong get b 1 8
25if eq mode 0
26if ge n 256
27ret 256
28end
29p = add 4 mul n 25972
30gnew b p kind
31put b 0 uchar and add n 1 255
32put b 1 uchar shr add n 1 8
33ret n
34end
35for j ulong n
36p = add 4 mul j 25972
37if gmatch b id p
38ret j
39end
40end
41ret 256
42end