interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / gpu / nvidia / 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