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/cmdlist/layout.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 / cmdlist / layout.om` 57 lines · 968 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 const CLMASK ulong `4294967295` 3 const CLBAD ulong `18446744073709551615` 4 note Legacy list sizing and inline mode patch are also seeded policy. 5 fn cmdlist_layout op ulong a view ulong 16 o edit ulong 16 to ulong 6 if eq op 0 7 if or eq get a 0 0 gt get a 0 4096 8 ret CLBAD 9 end 10 put o 0 mul get a 0 1024 11 put o 1 mul get a 0 16 12 put o 2 mul add get a 0 1 16 13 ret 0 14 end 15 if eq op 1 16 if lt get a 0 43 17 ret 0 18 end 19 avail = sub get a 0 43 20 if gt get a 1 avail 21 ret 0 22 end 23 per = ulong 8 24 if ne get a 2 0 25 per = ulong 202 26 end 27 if ne get a 3 0 28 per = add per 6 29 end 30 if ne get a 4 0 31 per = add per 6 32 end 33 ret div sub avail get a 1 per 34 end 35 if eq op 2 36 put o 0 0 37 put o 1 0 38 if ne get a 0 0 39 put o 0 `1638400` 40 put o 1 and shr add get a 1 512 8 CLMASK 41 end 42 ret 0 43 end 44 if eq op 3 45 if or ge get a 1 get a 0 eq get a 2 0 46 ret CLBAD 47 end 48 if gt get a 0 4096 49 ret CLBAD 50 end 51 if lt get a 2 sub get a 0 get a 1 52 ret add get a 1 get a 2 53 end 54 ret get a 0 55 end 56 ret CLBAD 57 end