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/native/learn53/catalog.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 / native / learn53 / catalog.om` 151 lines · 1872 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Eight fixed public development tasks. Not a sealed pool or a process runner. 3 fn kput p ulong v ulong to void 4 for i ulong 4 5 put kt add mul p 4 i uchar and shr v mul i 8 255 6 end 7 end 8 fn kbase id ulong to void 9 for i ulong 4096 10 put kt i 0 11 end 12 kput 0 `827086147` 13 kput 1 1 14 kput 3 1 15 kput 5 3 16 kput 6 1 17 kput 7 1 18 kput 8 2 19 kput 9 2 20 kput 10 2 21 kput 11 5 22 kput 12 5 23 kput 13 5 24 kput 14 1 25 kput 16 id 26 kput 17 1 27 kput 19 1 28 kput 20 1 29 end 30 fn klinear id ulong to void 31 if eq id 1 32 kput 2 1 33 kput 15 101 34 kput 24 `4294967295` 35 kput 25 111 36 kput 26 7 37 kput 27 222 38 kput 28 9 39 kput 29 1 40 kput 30 333 41 kput 31 4 42 kput 32 444 43 kput 33 6 44 ret 45 end 46 if eq id 4 47 kput 2 2 48 kput 15 201 49 kput 9 0 50 kput 10 1 51 kput 12 0 52 kput 13 1 53 kput 24 `4294967295` 54 kput 25 111 55 kput 26 2 56 kput 27 222 57 kput 28 3 58 ret 59 end 60 n = ulong 8 61 if or eq id 3 eq id 6 62 n = 17 63 end 64 kput 5 n 65 kput 8 1 66 kput 10 1 67 kput 11 n 68 if le id 3 69 kput 2 1 70 kput 9 1 71 kput 12 n 72 kput 13 n 73 kput 15 add 100 id 74 a = ulong 7 75 b = ulong 9 76 if eq id 3 77 a = `4294967295` 78 b = 3 79 end 80 for i ulong n 81 kput add 24 i a 82 kput add add 24 n i b 83 end 84 else 85 kput 2 2 86 kput 9 0 87 kput 12 0 88 kput 13 1 89 kput 15 add 197 id 90 for i ulong n 91 kput add 24 i `4294967295` 92 end 93 end 94 end 95 fn kmatrix id ulong to void 96 kput 2 3 97 if eq id 7 98 kput 5 2 99 kput 6 3 100 kput 7 2 101 kput 8 3 102 kput 9 4 103 kput 10 4 104 kput 11 5 105 kput 12 7 106 kput 13 7 107 kput 15 301 108 kput 24 1 109 kput 25 2 110 kput 26 999 111 kput 27 3 112 kput 28 4 113 kput 29 5 114 kput 30 6 115 kput 31 7 116 kput 32 999 117 kput 33 8 118 kput 34 9 119 kput 35 10 120 else 121 kput 5 3 122 kput 6 2 123 kput 7 3 124 kput 8 3 125 kput 9 2 126 kput 10 2 127 kput 11 9 128 kput 12 6 129 kput 13 6 130 kput 15 302 131 for i ulong 9 132 kput add 24 i add i 1 133 end 134 for i ulong 6 135 kput add 33 i add i 1 136 end 137 end 138 end 139 fn kload id ulong to ulong 140 note Reject before modifying either caller buffer. Valid loads never touch ko. 141 if or eq id 0 gt id 8 142 ret 0 143 end 144 kbase id 145 if le id 6 146 klinear id 147 else 148 kmatrix id 149 end 150 ret add 96 mul 4 add kw 11 kw 12 151 end