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

26 lines · 518 bytes Raw Blame History
1om2
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note Inner traversal blocks preserve the checked one-million-iteration guard.
4fn vc_set d edit uchar * q view ulong 4 v uchar to ulong
5for zzj ulong get q 1
6i = add get q 0 zzj
7put d i v
8end
9ret 0
10end
11
12fn av_set d edit uchar * n ulong v uchar to ulong
13q = new ulong 4 0
14r = ulong 0
15for zzb ulong add div n 1000000 1
16put q 0 mul zzb 1000000
17zzn = sub n get q 0
18if gt zzn 1000000
19zzn = ulong 1000000
20end
21put q 1 zzn
22rr = vc_set d q v
23r = rr
24end
25ret r
26end