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 / moe / moe_ids32.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Existing router u32 little-endian picks to ABI1 logical ulong words. |
| 3 | note n counts active entries, not tokens; no masking or expert validation here. |
| 4 | fn moe_ids32 src view uchar 4096 n ulong ids edit ulong 1024 to ulong |
| 5 | if gt n 1024 |
| 6 | ret 1 |
| 7 | end |
| 8 | for i ulong n |
| 9 | v = ulong 0 |
| 10 | for b ulong 4 |
| 11 | v = or v shl ulong get src add mul i 4 b mul b 8 |
| 12 | end |
| 13 | put ids i v |
| 14 | end |
| 15 | ret 0 |
| 16 | end |