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 / checks / arest-tcspec.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note gpu/nvidia/checks/arest-tcspec.om: artcsp (gpu/nvidia/om/apirest/tcspec.om); Q is its 8 uint q words, the output its 5 words. Composed before arest.om. |
| 3 | text t_name "AREST-TCSPEC" |
| 4 | text t_au "tcspec" |
| 5 | fn arop q view ulong 64 nq ulong ny ulong o edit ulong 128 to ulong |
| 6 | if or ne nq 8 ne ny 5 |
| 7 | ckbad |
| 8 | end |
| 9 | a = new uint 8 0 |
| 10 | for i ulong 8 |
| 11 | if gt get q i 4294967295 |
| 12 | ckbad |
| 13 | end |
| 14 | put a i uint get q i |
| 15 | end |
| 16 | y = new uint 5 0x5a5a5a5a |
| 17 | r = artcsp a y |
| 18 | for i ulong 5 |
| 19 | put o i ulong get y i |
| 20 | end |
| 21 | ret r |
| 22 | end |