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 / core / fmt.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Copyright 2026 Drake Stapleton |
| 3 | fn omfmt p view uchar 4 o edit ulong 4 to void |
| 4 | put o 0 1 |
| 5 | put o 1 6 |
| 6 | put o 2 0 |
| 7 | put o 3 0 |
| 8 | if ne get p 0 37 |
| 9 | ret |
| 10 | end |
| 11 | i = ulong 1 |
| 12 | size = ulong 0 |
| 13 | if eq get p i 122 |
| 14 | size = 3 |
| 15 | i = add i 1 |
| 16 | else |
| 17 | if eq get p i 108 |
| 18 | size = 1 |
| 19 | i = add i 1 |
| 20 | if eq get p i 108 |
| 21 | size = 2 |
| 22 | i = add i 1 |
| 23 | end |
| 24 | end |
| 25 | end |
| 26 | c = ulong get p i |
| 27 | if ne c 0 |
| 28 | put o 0 add i 1 |
| 29 | else |
| 30 | put o 0 i |
| 31 | end |
| 32 | put o 2 size |
| 33 | if eq c 37 |
| 34 | put o 1 0 |
| 35 | end |
| 36 | if eq c 115 |
| 37 | put o 1 1 |
| 38 | end |
| 39 | if eq c 99 |
| 40 | put o 1 2 |
| 41 | end |
| 42 | if eq c 100 |
| 43 | put o 1 3 |
| 44 | end |
| 45 | if eq c 117 |
| 46 | put o 1 4 |
| 47 | end |
| 48 | if eq c 120 |
| 49 | put o 1 5 |
| 50 | end |
| 51 | end |