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-calc.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note gpu/nvidia/checks/arest-calc.om: arcalc (gpu/nvidia/om/apirest/calc.om), ops 0 to 13, as calc_parts() of |
| 3 | note CUDApp tests/api_rest_partitions.h and prefill() of tests/api_rest_diff.c call it. Q is its 32 q words; q |
| 4 | note after the call is output 128 on. Composed before arestg.om. |
| 5 | text t_name "AREST-CALC" |
| 6 | text t_calc "calc" |
| 7 | fn arop q view ulong 256 nq ulong ny ulong o edit ulong 256 to ulong |
| 8 | if or ne nq 32 not ckis 0 t_calc |
| 9 | ckbad |
| 10 | end |
| 11 | a = new ulong 32 0 |
| 12 | for i ulong 32 |
| 13 | put a i get q i |
| 14 | end |
| 15 | r = arcalc a |
| 16 | for i ulong 32 |
| 17 | put o add 128 i get a i |
| 18 | end |
| 19 | ret r |
| 20 | end |