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 / native / learn53 / catalog.om

151 lines · 1872 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Eight fixed public development tasks. Not a sealed pool or a process runner.
3fn kput p ulong v ulong to void
4for i ulong 4
5put kt add mul p 4 i uchar and shr v mul i 8 255
6end
7end
8fn kbase id ulong to void
9for i ulong 4096
10put kt i 0
11end
12kput 0 827086147
13kput 1 1
14kput 3 1
15kput 5 3
16kput 6 1
17kput 7 1
18kput 8 2
19kput 9 2
20kput 10 2
21kput 11 5
22kput 12 5
23kput 13 5
24kput 14 1
25kput 16 id
26kput 17 1
27kput 19 1
28kput 20 1
29end
30fn klinear id ulong to void
31if eq id 1
32kput 2 1
33kput 15 101
34kput 24 4294967295
35kput 25 111
36kput 26 7
37kput 27 222
38kput 28 9
39kput 29 1
40kput 30 333
41kput 31 4
42kput 32 444
43kput 33 6
44ret
45end
46if eq id 4
47kput 2 2
48kput 15 201
49kput 9 0
50kput 10 1
51kput 12 0
52kput 13 1
53kput 24 4294967295
54kput 25 111
55kput 26 2
56kput 27 222
57kput 28 3
58ret
59end
60n = ulong 8
61if or eq id 3 eq id 6
62n = 17
63end
64kput 5 n
65kput 8 1
66kput 10 1
67kput 11 n
68if le id 3
69kput 2 1
70kput 9 1
71kput 12 n
72kput 13 n
73kput 15 add 100 id
74a = ulong 7
75b = ulong 9
76if eq id 3
77a = 4294967295
78b = 3
79end
80for i ulong n
81kput add 24 i a
82kput add add 24 n i b
83end
84else
85kput 2 2
86kput 9 0
87kput 12 0
88kput 13 1
89kput 15 add 197 id
90for i ulong n
91kput add 24 i 4294967295
92end
93end
94end
95fn kmatrix id ulong to void
96kput 2 3
97if eq id 7
98kput 5 2
99kput 6 3
100kput 7 2
101kput 8 3
102kput 9 4
103kput 10 4
104kput 11 5
105kput 12 7
106kput 13 7
107kput 15 301
108kput 24 1
109kput 25 2
110kput 26 999
111kput 27 3
112kput 28 4
113kput 29 5
114kput 30 6
115kput 31 7
116kput 32 999
117kput 33 8
118kput 34 9
119kput 35 10
120else
121kput 5 3
122kput 6 2
123kput 7 3
124kput 8 3
125kput 9 2
126kput 10 2
127kput 11 9
128kput 12 6
129kput 13 6
130kput 15 302
131for i ulong 9
132kput add 24 i add i 1
133end
134for i ulong 6
135kput add 33 i add i 1
136end
137end
138end
139fn kload id ulong to ulong
140note Reject before modifying either caller buffer. Valid loads never touch ko.
141if or eq id 0 gt id 8
142ret 0
143end
144kbase id
145if le id 6
146klinear id
147else
148kmatrix id
149end
150ret add 96 mul 4 add kw 11 kw 12
151end