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 / fp8x.om

13 lines · 324 bytes Raw Blame History
1om2
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note Fold f32 x by 2^64. WolframLanguageEvaluator: bits32[2^64] -> 1602224128.
4fn av_fp8x src view f32 * dst edit f32 * to ulong
5if ne len src len dst
6ret 1
7end
8fold = bitcast f32 uint 1602224128
9for i ulong len src
10put dst i mul get src i fold
11end
12ret 0
13end