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

34 lines · 617 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn vc_rfit ids view uint * q view ulong 16 zz view ulong 4 to ulong
3p = new ulong 16 0
4for jj ulong get zz 1
5i = add get zz 0 jj
6v = ulong get ids i
7put p 0 get q 0
8put p 1 v
9put p 2 get q 1
10rc = api_at_plan 24 p
11if or ne rc 0 eq get p 8 0
12ret 0
13end
14end
15ret 1
16end
17fn av_rfit ids view uint * q view ulong 16 n ulong to ulong
18zz = new ulong 4 0
19put zz 2 n
20r = ulong 1
21for bb ulong add div n 1000000 1
22put zz 0 mul bb 1000000
23cnt = sub n get zz 0
24if gt cnt 1000000
25cnt = ulong 1000000
26end
27put zz 1 cnt
28rr = vc_rfit ids q zz
29if eq rr 0
30ret 0
31end
32end
33ret r
34end