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 / seed / spirv / vk.unit.om

26 lines · 909 bytes Raw Blame History
1note Data-parallel fixtures for the Vulkan GLCompute path (gate-vkspirv.sh).
2note One invocation computes one element; inputs and outputs are canonical ulong words.
3fn vadd a ulong b ulong to ulong
4ret add a b
5end
6note Integer saxpy: signed, so an overflowing row traps (status 101) instead of wrapping.
7fn saxpy a long x long y long to long
8ret add mul a x y
9end
10note SplitMix64 finaliser, the element generator for the reduce fixture.
11fn mix x ulong to ulong
12z = add x 11400714819323198485
13z = mul xor z shr z 30 13787848793156543929
14z = mul xor z shr z 27 10723151780598845931
15ret xor z shr z 31
16end
17note Reduce stage 1: one invocation sums n generated u32 elements starting at base.
18note Stage 2 combines partials pairwise with vadd, one dispatch per tree level.
19fn rsum seed ulong base ulong n ulong to ulong
20s = ulong 0
21for i ulong n
22e = and mix add seed add base i 4294967295
23s = add s e
24end
25ret s
26end