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

32 lines · 608 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2fn vc_eff nb view uint * d edit uint * bs ulong zz view ulong 4 to ulong
3p = new ulong 16 0
4put p 2 bs
5for jj ulong get zz 1
6i = add get zz 0 jj
7put p 0 ulong get d i
8put p 1 ulong get nb i
9rc = api_at_plan 15 p
10if ne rc 0
11ret rc
12end
13put d i uint get p 8
14end
15ret 0
16end
17fn av_eff nb view uint * d edit uint * bs ulong to ulong
18zz = new ulong 4 0
19for bb ulong add div len nb 1000000 1
20put zz 0 mul bb 1000000
21cnt = sub len nb get zz 0
22if gt cnt 1000000
23cnt = ulong 1000000
24end
25put zz 1 cnt
26rc = vc_eff nb d bs zz
27if ne rc 0
28ret rc
29end
30end
31ret 0
32end