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 / tests / arboris / expert-hints.om
| 1 | note SPDX-License-Identifier: AGPL-3.0-only |
| 2 | fn main to int |
| 3 | topo = new uint 10 0 |
| 4 | weights = new uint 2 0 |
| 5 | state = new uint 12 0 |
| 6 | experts = new uint 4 0 |
| 7 | hints = new uint 4 0 |
| 8 | put topo 0 ar_topo_v1 |
| 9 | put topo 1 4 |
| 10 | put topo 2 2 |
| 11 | put topo 5 1 |
| 12 | put topo 6 2 |
| 13 | put topo 7 2 |
| 14 | put weights 0 ar_one |
| 15 | put weights 1 ar_one |
| 16 | put state 0 1 |
| 17 | put state 2 0x3f000000 |
| 18 | put state 4 ar_one |
| 19 | put experts 0 0xffffffff |
| 20 | put experts 1 383 |
| 21 | put experts 2 12 |
| 22 | put experts 3 12 |
| 23 | if ne arboris_relax_step topo weights state 0 |
| 24 | ret 1 |
| 25 | end |
| 26 | count = arboris_expert_hints part state 8 4 experts hints |
| 27 | if ne count 2 |
| 28 | ret 2 |
| 29 | end |
| 30 | if or ne get hints 1 12 ne get hints 3 383 |
| 31 | ret 3 |
| 32 | end |
| 33 | put experts 0 384 |
| 34 | if ne arboris_expert_hints part state 8 4 experts hints long -1 |
| 35 | ret 4 |
| 36 | end |
| 37 | if not arboris_send_hints 1 hints ulong count |
| 38 | ret 5 |
| 39 | end |
| 40 | ret 0 |
| 41 | end |