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 / components / admit.om

59 lines · 1368 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Concatenate after staged.om, compose.om, quant.om and realize.om.
3note Structural binding ONLY: out8 must be fresh successful bc_compose output.
4note No proof of freshness, code identity, qualification, maps or device safety here.
5fn bc_record cfg view ulong 16 b view uchar 4096 l view ulong 32 actual view ulong 8 to uint
6spec = new ulong 16 0
7if ne compose_launch b l 0
8ret 1
9end
10if or ne get cfg 0 3 ne compose_word b 19 3
11ret 2
12end
13for k ulong 10
14if ne get cfg add k 6 0
15ret 2
16end
17end
18for k ulong 5
19put spec k get cfg add k 1
20end
21if not sg_valid spec
22ret 2
23end
24if or ne get cfg 1 compose_word b 6 ne mul get cfg 2 32 compose_word b 16
25ret 2
26end
27if or ne get cfg 3 compose_word b 14 ne get cfg 4 compose_word b 17
28ret 2
29end
30if ne get l 12 add ulong 8 mul get cfg 5 4
31ret 2
32end
33if or eq get actual 0 0 gt get actual 0 1024
34ret 3
35end
36if or lt get actual 1 3 gt get actual 1 128
37ret 3
38end
39if or eq get actual 4 0 gt get actual 4 256
40ret 3
41end
42if or ne get actual 2 6 ne get actual 5 1
43ret 3
44end
45if or ne get actual 6 0 ne get actual 7 0
46ret 3
47end
48if ne get actual 3 mul mul get cfg 3 128 get cfg 2
49ret 3
50end
51if gt get actual 3 compose_word b 21
52ret 3
53end
54note Preserve omega_bw_gpr_declared_ok: multiple8 AND declaration at least peak+2.
55if lt compose_word b 22 add get actual 1 2
56ret 3
57end
58ret 0
59end