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 / om / apirest / gath16.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | fn argath16 rows view uint * x view ushort * y edit ushort * to ulong |
| 4 | if eq len rows 0 |
| 5 | ret 0 |
| 6 | end |
| 7 | k = div len y len rows |
| 8 | for r ulong 4294967296 |
| 9 | if ge r len rows |
| 10 | break |
| 11 | end |
| 12 | p = mul ulong get rows r k |
| 13 | d = mul r k |
| 14 | for c ulong 18446744073709551615 |
| 15 | if ge c k |
| 16 | break |
| 17 | end |
| 18 | put y add d c get x add p c |
| 19 | end |
| 20 | end |
| 21 | ret 0 |
| 22 | end |