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 / core / vector.om

44 lines · 789 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Copyright 2026 Drake Stapleton
3fn vread p view uchar 4096 i ulong to ulong
4x = ulong 0
5for j ulong 4
6x = or x shl ulong get p add mul i 4 j mul j 8
7end
8ret x
9end
10fn vwrite p edit uchar 4096 i ulong x ulong to void
11for j ulong 4
12put p add mul i 4 j uchar and shr x mul j 8 255
13end
14end
15fn omvec a edit uchar 4096 b edit uchar 4096 c edit uchar 4096 n ulong base ulong mode ulong to ulong
16for j ulong n
17i = add base j
18if eq mode 2
19x = add 1000 i
20y = add 2000 mul i 2
21if eq i 0
22x = 4294967294
23y = 3
24end
25if eq i 1
26x = 2147483648
27y = 2147483648
28end
29vwrite a j x
30vwrite b j y
31vwrite c j 3735928559
32else
33x = and add vread a j vread b j 4294967295
34if eq mode 0
35vwrite c j x
36else
37if ne vread c j x
38ret j
39end
40end
41end
42end
43ret 1024
44end