interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / om / moe / moe_maps32_wide.om

29 lines · 745 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note moe_maps32 at wide capacity: logical ulong maps (X at 0, Y at 1416) to u32 maps.
3note Output bytes X at 0, Y at 1416*4. Unused output bytes untouched.
4note Validate every active value before writing; caller retains map capacity/generation lease.
5fn mw_m32 out edit uchar 11328 p ulong v ulong to void
6for b ulong 4
7put out add mul p 4 b uchar and shr v mul b 8 255
8end
9end
10fn moe_maps32_wide m view ulong 8 mp view ulong 2832 out edit uchar 11328 to ulong
11if gt get m 0 1408
12ret 1
13end
14n = add get m 0 8
15for z ulong 2
16for i ulong n
17if gt get mp add mul z 1416 i 4294967295
18ret 2
19end
20end
21end
22for z ulong 2
23for i ulong n
24p = add mul z 1416 i
25mw_m32 out p get mp p
26end
27end
28ret 0
29end