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