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_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