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

50 lines · 616 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note Read-only consumer guard: existing one-line commit lock then observed git HEAD.
3global data uchar 83
4fn main to int
5n = ulong 0
6while lt n 83
7r = read 0 data n sub ulong 83 n
8if lt r 0
9ret 3
10end
11if eq r 0
12break
13end
14n = add n ulong r
15end
16if ne n 82
17ret 3
18end
19if ne get data 40 10
20ret 3
21end
22if ne get data 81 10
23ret 3
24end
25nonzero = false
26for i ulong 40
27c = get data i
28if lt c 48
29ret 3
30end
31if gt c 57
32if lt c 97
33ret 3
34end
35if gt c 102
36ret 3
37end
38end
39if ne c 48
40nonzero = true
41end
42if ne c get data add i 41
43ret 3
44end
45end
46if not nonzero
47ret 3
48end
49ret 0
50end