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 / apiviews / gdnsc.om
| 1 | om2 |
| 2 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 3 | note Interleave already-computed neg-exp scales with dt bias. |
| 4 | note len sc is twice len ng, and len dt equals len ng. The exp stays in C. |
| 5 | fn av_gdnsc ng view f32 * dt view f32 * sc edit f32 * to ulong |
| 6 | if ne len ng len dt |
| 7 | ret 1 |
| 8 | end |
| 9 | if ne len sc add len ng len ng |
| 10 | ret 1 |
| 11 | end |
| 12 | n = len ng |
| 13 | for i ulong n |
| 14 | put sc mul i 2 get ng i |
| 15 | put sc add mul i 2 1 get dt i |
| 16 | end |
| 17 | ret 0 |
| 18 | end |