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

37 lines · 550 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Development fixture emitter: exactly one input byte, public catalog ID1..8.
3global CIn uchar 2
4fn main to int
5pos = ulong 0
6done = false
7while eq done false bound 3
8r = read 0 CIn pos sub 2 pos
9if lt r 0
10ret 74
11end
12if eq r 0
13done = true
14else
15pos = add pos ulong r
16if eq pos 2
17ret 65
18end
19end
20end
21if ne pos 1
22ret 65
23end
24n = kload ulong get CIn 0
25if eq n 0
26ret 77
27end
28pos = 0
29while lt pos n bound 257
30w = write 1 kt pos sub n pos
31if le w 0
32ret 74
33end
34pos = add pos ulong w
35end
36ret 0
37end