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-check.om

34 lines · 533 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Emitter stream checker; first byte selects expected catalog, remaining bytes task.
3global CBuf uchar 258
4fn main to int
5pos = ulong 0
6done = false
7while eq done false bound 259
8r = read 0 CBuf pos sub 258 pos
9if lt r 0
10ret 1
11end
12if eq r 0
13done = true
14else
15pos = add pos ulong r
16if eq pos 258
17ret 1
18end
19end
20end
21if eq pos 0
22ret 1
23end
24n = kload ulong get CBuf 0
25if or eq n 0 ne pos add n 1
26ret 1
27end
28for i ulong n
29if ne get kt i get CBuf add i 1
30ret 1
31end
32end
33ret 0
34end