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_buf.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_buf.om` 27 lines · 617 bytes Raw Blame History 1 om2 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note Runtime extents are exact live windows, never padded caller allocations. 4 note Inner traversal blocks preserve the checked one-million-iteration guard. 5 fn vc_buf s view uchar * d edit uchar * q view ulong 4 to ulong 6 for zzj ulong get q 1 7 i = add get q 0 zzj 8 put d i get s i 9 end 10 ret 0 11 end 12 13 fn av_copy s view uchar * d edit uchar * n ulong to ulong 14 q = new ulong 4 0 15 r = ulong 0 16 for zzb ulong add div n `1000000` 1 17 put q 0 mul zzb `1000000` 18 zzn = sub n get q 0 19 if gt zzn `1000000` 20 zzn = ulong `1000000` 21 end 22 put q 1 zzn 23 rr = vc_buf s d q 24 r = rr 25 end 26 ret r 27 end