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
CUDApp / om / api / attn_lay.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | fn av_lay p view ulong 32 a edit uint 32 mask ulong to ulong |
| 3 | i = ulong 0 |
| 4 | while lt i 32 |
| 5 | v = get p i |
| 6 | put a i uint and v 4294967295 |
| 7 | if ne and shr mask i 1 0 |
| 8 | if eq i 31 |
| 9 | ret 1 |
| 10 | end |
| 11 | put a add i 1 uint shr v 32 |
| 12 | i = add i 1 |
| 13 | end |
| 14 | i = add i 1 |
| 15 | end |
| 16 | ret 0 |
| 17 | end |