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
CUDApp / tests / learn53 / stream-check.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | text expected "HOST_ONLY 0\n" |
| 3 | global seen uchar 32 |
| 4 | fn main to int |
| 5 | n = ulong 0 |
| 6 | for j ulong 33 |
| 7 | if ge n 32 |
| 8 | ret 1 |
| 9 | end |
| 10 | r = read 0 seen n sub 32 n |
| 11 | if lt r 0 |
| 12 | ret 74 |
| 13 | end |
| 14 | if eq r 0 |
| 15 | if ne n len expected |
| 16 | ret 1 |
| 17 | end |
| 18 | for i ulong n |
| 19 | if ne get seen i get expected i |
| 20 | ret 1 |
| 21 | end |
| 22 | end |
| 23 | ret 0 |
| 24 | end |
| 25 | n = add n ulong r |
| 26 | end |
| 27 | ret 1 |
| 28 | end |