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_gath.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_gath.om` 40 lines · 732 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 fn vc_gath s view uchar * d edit uchar * q view ulong 16 to ulong 3 r = new ulong 4 0 4 put r 2 get q 2 5 for jj ulong get q 7 6 t = add get q 6 jj 7 for h ulong get q 1 8 src = mul t get q 3 9 dst = mul h get q 4 10 src = add src dst 11 src = mul src get q 5 12 dst = mul t get q 1 13 dst = add dst h 14 dst = mul dst get q 2 15 put r 0 src 16 put r 1 dst 17 av_cseg s d r 18 end 19 end 20 ret 0 21 end 22 fn av_gath s view uchar * d edit uchar * q view ulong 16 to ulong 23 z = new ulong 16 0 24 for j ulong 16 25 put z j get q j 26 end 27 for bb ulong add div get q 0 `1000000` 1 28 put z 6 mul bb `1000000` 29 cnt = sub get q 0 get z 6 30 if gt cnt `1000000` 31 cnt = ulong `1000000` 32 end 33 put z 7 cnt 34 rc = vc_gath s d z 35 if ne rc 0 36 ret rc 37 end 38 end 39 ret 0 40 end