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 / cache.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note q: entry count, entry bytes, valid-byte offset, key offset, key bytes. |
| 4 | fn ar_cm q view ulong 8 a view uchar * key view uchar * i ulong to ulong |
| 5 | b = mul i get q 1 |
| 6 | if eq get a add b get q 2 0 |
| 7 | ret 0 |
| 8 | end |
| 9 | if ne get q 5 0 |
| 10 | if ne get a add b sub get q 5 1 0 |
| 11 | ret 0 |
| 12 | end |
| 13 | end |
| 14 | b = add b get q 3 |
| 15 | for j ulong len key |
| 16 | if ne get a add b j get key j |
| 17 | ret 0 |
| 18 | end |
| 19 | end |
| 20 | ret 1 |
| 21 | end |
| 22 | fn arcache q view ulong 8 a view uchar * key view uchar * to ulong |
| 23 | for i ulong get q 0 |
| 24 | if ne ar_cm q a key i 0 |
| 25 | ret i |
| 26 | end |
| 27 | end |
| 28 | ret 18446744073709551615 |
| 29 | end |