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_lay.om

17 lines · 306 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn av_lay p view ulong 32 a edit uint 32 mask ulong to ulong
3i = ulong 0
4while lt i 32
5v = get p i
6put a i uint and v 4294967295
7if ne and shr mask i 1 0
8if eq i 31
9ret 1
10end
11put a add i 1 uint shr v 32
12i = add i 1
13end
14i = add i 1
15end
16ret 0
17end