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 / apirest / mstep.om

49 lines · 1058 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note q15 mode: upload chunks, output windows, row launches. C owns pointer acquisition and effects only.
3fn armstep q edit ulong 16 x view uint * to ulong
4if eq get q 15 3
5for i ulong get q 1
6if eq wok get x i uint get q 2 uint get q 3 0
7ret i
8end
9end
10ret get q 1
11end
12if ge get q 0 get q 1
13ret 0
14end
15if eq get q 15 0
16first = get q 0
17last = add first get q 3
18if gt last get q 1
19last = get q 1
20end
21put q 8 first
22put q 9 last
23put q 10 mul mul first get q 2 8
24put q 11 mul mul sub last first get q 2 8
25put q 12 mul get q 11 2
26put q 0 last
27ret 1
28end
29if eq get q 15 1
30put q 8 get q 0
31put q 9 add get q 5 mul mul add div ulong get x get q 0 8 get q 6 get q 2 16
32put q 10 mul mul get q 0 get q 3 get q 4
33put q 0 add get q 0 1
34ret 1
35end
36if eq get q 15 2
37rows = sub get q 1 get q 0
38if gt rows get q 2
39rows = get q 2
40end
41put q 8 rows
42put q 9 div div rows 16 get q 3
43put q 10 add get q 6 mul mul get q 0 get q 4 2
44put q 11 add get q 7 mul mul get q 0 get q 5 4
45put q 0 add get q 0 get q 2
46ret 1
47end
48ret 0
49end