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 / om / gpu / dsv41 / decoder / check-engram.om
| 1 | note SPDX-License-Identifier: AGPL-3.0-only |
| 2 | note Print both layers' 24 row IDs at each position of a text-only control. |
| 3 | fn main to int |
| 4 | path = new uchar 4096 0 |
| 5 | n = argread 1 path 0 4096 |
| 6 | if or ne argcnt 2 le n 0 |
| 7 | ret 64 |
| 8 | end |
| 9 | fd = fopen path 0 ulong n 524288 0 |
| 10 | if lt fd 0 |
| 11 | ret 66 |
| 12 | end |
| 13 | if not ar_claim_compute 1 |
| 14 | ret 75 |
| 15 | end |
| 16 | if not dgLoad int fd |
| 17 | ret 65 |
| 18 | end |
| 19 | closed = fclose int fd |
| 20 | ids = new uint 24 0 |
| 21 | buf = new uchar 96 0 |
| 22 | for pos ulong 12 |
| 23 | if not dgToken pos uint rem mul pos 11213 dgTokenCount |
| 24 | ret 1 |
| 25 | end |
| 26 | for i ulong 2 |
| 27 | if not dgRows add 1 mul i 13 ids |
| 28 | ret 2 |
| 29 | end |
| 30 | for j ulong 24 |
| 31 | diPut buf mul j 4 4 ulong get ids j |
| 32 | end |
| 33 | if ne write 1 buf 0 96 96 |
| 34 | ret 74 |
| 35 | end |
| 36 | end |
| 37 | end |
| 38 | ar_drop_compute |
| 39 | ret 0 |
| 40 | end |