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 / cmdlist / book.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Command-list lifetime decisions. Inputs follow clbook in the C shell: |
| 3 | note op 0 generation,recoveries,epoch,current epoch; op 1 latch,recoveries. |
| 4 | const WMASK ulong 4294967295 |
| 5 | const REFUSED ulong 18446744073709551615 |
| 6 | |
| 7 | fn book op ulong a view ulong 16 o edit ulong 4 to ulong |
| 8 | if eq op 0 |
| 9 | if eq get a 0 get a 1 |
| 10 | if eq get a 2 get a 3 |
| 11 | ret 0 |
| 12 | end |
| 13 | end |
| 14 | ret 1 |
| 15 | end |
| 16 | if eq op 1 |
| 17 | if eq get a 0 and add get a 1 1 WMASK |
| 18 | ret 1 |
| 19 | end |
| 20 | ret 0 |
| 21 | end |
| 22 | ret REFUSED |
| 23 | end |