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_effects.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_effects.om` 36 lines · 794 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 2 note Platform publication barrier and ring-byte store. No device is opened. 3 note cpufence is AArch64 DSB SY / x86-64 MFENCE (omega-mv retire compiler, MAPPING.md). 4 note Bound `1048576` is 2^20 (WolframLanguageEvaluator: 2^20 -> `1048576`). 5 om2 6 export fn plat_fence to long 7 cpufence 8 ret long 1 9 end 10 export fn plat_ring_store dst edit uchar * bytes view uchar * n ulong to long 11 if eq n 0 12 ret long 0 13 end 14 if lt `1048576` n 15 ret long 0 16 end 17 for i ulong n 18 put dst i get bytes i 19 end 20 cpufence 21 ret long n 22 end 23 export fn plat_map_store handle long off ulong bytes view uchar * n ulong to long 24 if eq n 0 25 ret neg long 22 26 end 27 if lt `1048576` n 28 ret neg long 22 29 end 30 wrote = mapwrite handle off bytes 0 n 31 if ne wrote long n 32 ret wrote 33 end 34 cpufence 35 ret wrote 36 end