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_max.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_max.om` 30 lines · 572 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 fn vc_max s view uint * zz view ulong 4 to ulong 3 r = ulong 1 4 for jj ulong get zz 1 5 i = add get zz 0 jj 6 if gt ulong get s i r 7 r = ulong get s i 8 end 9 end 10 ret r 11 end 12 fn av_max s view uint * n ulong to ulong 13 zz = new ulong 4 0 14 put zz 2 n 15 r = ulong 1 16 for bb ulong add div n `1000000` 1 17 put zz 0 mul bb `1000000` 18 cnt = sub n get zz 0 19 if gt cnt `1000000` 20 cnt = ulong `1000000` 21 end 22 put zz 1 cnt 23 rr = vc_max s zz 24 if gt rr r 25 r = rr 26 end 27 end 28 ret r 29 end 30 note Preserve the cut-F float polynomial, scalar order and empty-split handling.