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 / checks / avv-rpois.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note gpu/nvidia/checks/avv-rpois.om: av_rpois (gpu/nvidia/om/api/attn_rpois.om) against av_routerpoison of CUDApp src/omega_attn_views.h; |
| 3 | note A is f32, B uint; r counts the first n with A equal to the f32 of the low 32 bits of v or B equal to its high 32; h over A. Composed before avv.om (its rows and the A, B, v, r, h they name). |
| 4 | text t_name "AVV-RPOIS" |
| 5 | text t_au "rpois" |
| 6 | fn cname to void |
| 7 | for i ulong len t_name bound 64 |
| 8 | ckoc ulong get t_name i |
| 9 | end |
| 10 | end |
| 11 | fn avcap to ulong |
| 12 | ret 1000003 |
| 13 | end |
| 14 | fn avop a view ulong 9 b view ulong 9 l ulong n ulong v ulong o edit ulong 2 to void |
| 15 | w = new f32 1000003 f32 0 |
| 16 | avgf w a l |
| 17 | put o 0 n |
| 18 | put o 1 v |
| 19 | avop2 w b l o |
| 20 | end |
| 21 | note n and v come in o (an unsized view takes two of the six parameter slots) |
| 22 | fn avop2 w view f32 * b view ulong 9 l ulong o edit ulong 2 to void |
| 23 | ids = new uint 1000003 0 |
| 24 | avgu ids b l |
| 25 | put o 0 av_rpois w ids get o 0 get o 1 |
| 26 | put o 1 avhf w l |
| 27 | end |