Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/om/api/attn_blks.om # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / om / api / attn_blks.om` 34 lines · 599 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 fn vc_blks ids view uint * q view ulong 16 zz view ulong 4 to ulong 3 p = new ulong 16 0 4 for j ulong 6 5 put p j get q j 6 end 7 for jj ulong get zz 1 8 i = add get zz 0 jj 9 put p 0 ulong get ids i 10 rc = api_at_plan 16 p 11 if ne rc 0 12 ret rc 13 end 14 end 15 ret 0 16 end 17 fn av_blks ids view uint * q view ulong 16 n ulong to ulong 18 zz = new ulong 4 0 19 put zz 2 n 20 r = ulong 0 21 for bb ulong add div n `1000000` 1 22 put zz 0 mul bb `1000000` 23 cnt = sub n get zz 0 24 if gt cnt `1000000` 25 cnt = ulong `1000000` 26 end 27 put zz 1 cnt 28 rr = vc_blks ids q zz 29 if ne rr 0 30 ret rr 31 end 32 end 33 ret r 34 end