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 / tests / components / compose-unit.om

53 lines · 785 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Actual root caller, not a generator-only substitute.
3fn ut_compose cfg view ulong 16 to uint
4ins = new ulong 8192 0
5m = new ulong 2048 0
6p = new ulong 288 0
7out = new ulong 8 0
8rc = bc_compose cfg ins m p out
9if ne rc 0
10ret rc
11end
12if or eq get out 0 0 eq get out 1 0
13ret 99
14end
15ret 0
16end
17fn main to int
18cfg = new ulong 16 0
19put cfg 0 1
20put cfg 1 256
21put cfg 2 8
22put cfg 3 1
23put cfg 4 4
24if ne ut_compose cfg 0
25ret 1
26end
27put cfg 5 1
28if ne ut_compose cfg 0
29ret 2
30end
31put cfg 0 2
32put cfg 5 0
33if ne ut_compose cfg 0
34ret 3
35end
36put cfg 0 3
37put cfg 1 2048
38put cfg 2 16
39put cfg 3 4
40put cfg 4 16
41if ne ut_compose cfg 0
42ret 4
43end
44put cfg 5 1
45if ne ut_compose cfg 0
46ret 5
47end
48put cfg 6 1
49if eq ut_compose cfg 0
50ret 6
51end
52ret 0
53end