interplane.Get Omega
Read in your language

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

branch main Branches Tags History

CUDApp / om / apiviews / gdnsc.om

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