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 / shader-pilot / stream-check.om

48 lines · 673 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Test-only canonical stream checker. Exactly ID, selector, payload until EOF.
3global spbuf uchar 515
4fn main to int
5pos = ulong 0
6done = false
7while not done bound 516
8r = read 0 spbuf pos sub 515 pos
9if lt r 0
10ret 74
11end
12if eq r 0
13done = true
14else
15pos = add pos ulong r
16if eq pos 515
17ret 65
18end
19end
20end
21if lt pos 2
22ret 65
23end
24mode = get spbuf 1
25if and ne mode 1 ne mode 2
26ret 77
27end
28n = spload ulong get spbuf 0
29if eq n 0
30ret 77
31end
32if eq mode 2
33n = 512
34end
35if ne pos add n 2
36ret 65
37end
38for i ulong n
39want = get kt i
40if eq mode 2
41want = get gbcode i
42end
43if ne get spbuf add i 2 want
44ret 1
45end
46end
47ret 0
48end