omega-helix
This project has not described itself yet.
Brought by drakestapleton
omega-helix / native / lpool.om
| 1 | note SPDX-License-Identifier: AGPL-3.0-only |
| 2 | note omegallm lpool.om: dynamic om2 bank-B pools for hosted targets (gb10, aarch64, macos, x86linux). |
| 3 | note Grows on demand via `enlarge` up to 500M+ parameters (e.g. Spiral-2048 D<=2048, L_phys=8 x NP=4 = 32L). |
| 4 | const OWWN ulong 500000000 |
| 5 | global oww f64 * |
| 6 | const OGBN ulong 500000000 |
| 7 | global ogb f64 * |
| 8 | const OABN ulong 300000000 |
| 9 | global oab f64 * |
| 10 | const OPABN ulong 150000000 |
| 11 | global opab f64 * |
| 12 | global olp_sz ulong 4 |
| 13 | |
| 14 | fn olp_grow w ulong g ulong a ulong to bool |
| 15 | if gt w get olp_sz 0 |
| 16 | r = enlarge oww w |
| 17 | if ne r 0 |
| 18 | ret false |
| 19 | end |
| 20 | put olp_sz 0 w |
| 21 | end |
| 22 | if gt g get olp_sz 1 |
| 23 | r = enlarge ogb g |
| 24 | if ne r 0 |
| 25 | ret false |
| 26 | end |
| 27 | put olp_sz 1 g |
| 28 | end |
| 29 | if gt a get olp_sz 2 |
| 30 | r = enlarge oab a |
| 31 | if ne r 0 |
| 32 | ret false |
| 33 | end |
| 34 | put olp_sz 2 a |
| 35 | end |
| 36 | ret true |
| 37 | end |
| 38 | |
| 39 | fn olp_grow_pa pa ulong to bool |
| 40 | if gt pa get olp_sz 3 |
| 41 | r = enlarge opab pa |
| 42 | if ne r 0 |
| 43 | ret false |
| 44 | end |
| 45 | put olp_sz 3 pa |
| 46 | end |
| 47 | ret true |
| 48 | end |