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 / api / attn_cseg.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | fn vc_seg s view uchar * d edit uchar * r view ulong 4 start ulong to void |
| 3 | cnt = sub get r 2 start |
| 4 | if gt cnt 1000000 |
| 5 | cnt = ulong 1000000 |
| 6 | end |
| 7 | for j ulong cnt |
| 8 | b = add start j |
| 9 | idx = add get r 0 b |
| 10 | v = get s idx |
| 11 | idx = add get r 1 b |
| 12 | put d idx v |
| 13 | end |
| 14 | end |
| 15 | fn av_cseg s view uchar * d edit uchar * r view ulong 4 to void |
| 16 | for bb ulong add div get r 2 1000000 1 |
| 17 | vc_seg s d r mul bb 1000000 |
| 18 | end |
| 19 | end |