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 / gseg.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | fn argseg q edit ulong 16 y edit ulong * to ulong |
| 4 | i = mul get q 10 4 |
| 5 | if gt add i 4 len y |
| 6 | ret 1 |
| 7 | end |
| 8 | n = sub get q 1 get q 0 |
| 9 | put y i get q 8 |
| 10 | put y add i 1 get q 9 |
| 11 | put y add i 2 or get q 0 shl n 32 |
| 12 | put y add i 3 0 |
| 13 | p = div add n sub get q 2 1 get q 2 |
| 14 | if gt p get q 5 |
| 15 | put q 5 p |
| 16 | end |
| 17 | w = mul get q 3 get q 4 |
| 18 | put q 6 add get q 6 mul p w |
| 19 | put q 7 add get q 7 w |
| 20 | put q 0 get q 1 |
| 21 | put q 10 add get q 10 1 |
| 22 | ret 0 |
| 23 | end |