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/tools/tilelab_process.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 / tools / tilelab_process.om` 77 lines · 1265 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Shared bounded argument packing and direct child execution. No shell or GPU calls. 3 global ta uchar 4096 4 global tb uchar 4096 5 global tp ulong 2 6 global tw uchar 4096 7 global tn ulong 1 8 global ts uchar 4 9 fn tl_clear to void 10 put tp 0 2 11 put tp 1 0 12 end 13 fn tl_add to void 14 n = get tn 0 15 p = get tp 0 16 if or ge get tp 1 64 gt add add p n 2 4096 17 exit 90 18 end 19 put ta p uchar and n 255 20 put ta add p 1 uchar shr n 8 21 for i ulong n 22 put ta add add p 2 i get tb i 23 end 24 put tp 0 add add p 2 n 25 put tp 1 add get tp 1 1 26 end 27 fn tl_arg idx ulong to void 28 n = argread idx tb 0 4095 29 if lt n 0 30 exit 90 31 end 32 put tn 0 ulong n 33 end 34 fn tl_word idx ulong to void 35 note Both scans advance p once per pass through the fixed 4096-byte word pool. 36 p = ulong 0 37 k = ulong 0 38 while lt k idx bound 4096 39 if ge p len tw 40 exit 90 41 end 42 if eq get tw p 10 43 k = add k 1 44 end 45 p = add p 1 46 end 47 n = ulong 0 48 while lt p len tw bound 4096 49 if eq get tw p 10 50 break 51 end 52 put tb n get tw p 53 n = add n 1 54 p = add p 1 55 end 56 put tn 0 n 57 end 58 fn tl_run to int 59 put ta 0 uchar get tp 1 60 put ta 1 0 61 pid = fork 62 if lt pid 0 63 ret 91 64 end 65 if eq pid 0 66 r = execprog ta 0 get tp 0 67 exit 127 68 end 69 r = waitpid int pid ts 0 4 0 70 if ne r pid 71 ret 91 72 end 73 if ne get ts 0 0 74 ret 92 75 end 76 ret int get ts 1 77 end