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-trace.om
| 1 | note SPDX-License-Identifier: AGPL-3.0-only |
| 2 | note Known control stream for independent byte and digest verification. |
| 3 | fn main to int |
| 4 | ctx = new uchar 104 0 |
| 5 | digest = new uchar 32 0 |
| 6 | coord = new uint 3 0 |
| 7 | ids = new uint 6 0 |
| 8 | weights = new uint 6 0 |
| 9 | times = new ulong 2 0 |
| 10 | dtStart ctx |
| 11 | if not ar_claim_compute 1 |
| 12 | ret 75 |
| 13 | end |
| 14 | for i ulong 6 |
| 15 | put ids i uint i |
| 16 | put weights i 0x3e800000 |
| 17 | end |
| 18 | for layer ulong 40 |
| 19 | put coord 2 uint layer |
| 20 | put times 0 mul layer 2 |
| 21 | put times 1 add mul layer 2 1 |
| 22 | if not dtAppend coord ids weights times |
| 23 | ret 1 |
| 24 | end |
| 25 | if dtAppend coord ids weights times |
| 26 | ret 2 |
| 27 | end |
| 28 | end |
| 29 | if not dtFinish 1 ctx digest |
| 30 | ret 3 |
| 31 | end |
| 32 | if dtAppend coord ids weights times |
| 33 | ret 4 |
| 34 | end |
| 35 | ar_drop_compute |
| 36 | if ne write 2 digest 0 32 32 |
| 37 | ret 74 |
| 38 | end |
| 39 | ret 0 |
| 40 | end |