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 / mag.om
| 1 | note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | note Host verification reference: separate f64 accumulation and magnitude to fit six native slots. |
| 3 | fn armag w view uchar * sc view ushort * x view f32 * to ulong |
| 4 | s = f64 0 |
| 5 | for i ulong 4294967296 |
| 6 | if ge i mul div len x 128 128 |
| 7 | break |
| 8 | end |
| 9 | p = f64 bitcast f32 refb uint get w i |
| 10 | p = mul p f64 get x i |
| 11 | p = mul p f64 bitcast f32 shl uint get sc div i 128 16 |
| 12 | s = add s fabs p |
| 13 | end |
| 14 | ret bitcast ulong s |
| 15 | end |