interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / 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