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/platform-linux/plat_map_fixture.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 / platform-linux / plat_map_fixture.om` 38 lines · 552 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Anonymous mapwrite plus cpufence. Never opens /dev/nvidia. Exit 0 on the expected prefix bytes. 3 global b uchar 8 4 global out uchar 8 5 fn main to int 6 h = mapnew neg int 1 0 4096 3 34 7 if lt h 0 8 ret 2 9 end 10 put b 0 1 11 put b 1 0 12 put b 2 0 13 put b 3 0 14 put b 4 2 15 put b 5 0 16 put b 6 0 17 put b 7 0 18 n = mapwrite h 0 b 0 8 19 if ne n 8 20 ret 3 21 end 22 cpufence 23 got = mapread h 0 out 0 8 24 if ne got 8 25 ret 3 26 end 27 if ne get out 0 1 28 ret 4 29 end 30 if ne get out 4 2 31 ret 4 32 end 33 drop = mapdrop h 34 if ne drop 0 35 ret 5 36 end 37 ret 0 38 end