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/codegen/pf_admit.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 / codegen / pf_admit.om` 50 lines · 663 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note op 0 router admission, 1 router shared bytes, 2 MoE combine admission. 3 fn pf_admit op ulong k ulong e ulong t ulong m ulong to ulong 4 if gt m 2 5 ret 0 6 end 7 if eq op 2 8 if or lt k 128 gt k 4096 9 ret 0 10 end 11 if ne rem k 128 0 12 ret 0 13 end 14 if or lt e 4 gt e 16 15 ret 0 16 end 17 if ne rem e 4 0 18 ret 0 19 end 20 ret 1 21 end 22 if gt op 1 23 ret 0 24 end 25 if or lt k 128 gt k 16384 26 ret 0 27 end 28 if ne rem k 128 0 29 ret 0 30 end 31 if or lt e 32 gt e 1024 32 ret 0 33 end 34 if ne rem e 32 0 35 ret 0 36 end 37 if or lt t 1 gt t 16 38 ret 0 39 end 40 if ne rem t div e 32 0 41 ret 0 42 end 43 if gt mul mul add div k 4 1 e 16 `2147483647` 44 ret 0 45 end 46 if eq op 1 47 ret mul t 512 48 end 49 ret 1 50 end