interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / gpu / nvidia / om / api / attn_reset.om

26 lines · 531 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn vc_reset slots edit uint * ids view uint * zz view ulong 4 to ulong
3for jj ulong get zz 1
4i = add get zz 0 jj
5put slots ulong get ids i uint 4294967295
6end
7ret 0
8end
9fn av_reset slots edit uint * ids view uint * n ulong to ulong
10zz = new ulong 4 0
11put zz 2 n
12r = ulong 0
13for bb ulong add div n 1000000 1
14put zz 0 mul bb 1000000
15cnt = sub n get zz 0
16if gt cnt 1000000
17cnt = ulong 1000000
18end
19put zz 1 cnt
20rr = vc_reset slots ids zz
21if ne rr 0
22ret rr
23end
24end
25ret r
26end