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