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 / checks / arest-mrow.om

32 lines · 815 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-mrow.om: mrow (gpu/nvidia/om/codegen/cg_mrow.om), as packing() of CUDApp
3note tests/api_rest_diff.c calls it. Q m, n, np; s[i] = (float)i; output 0 the digest of the m * n copied bit
4note patterns. Composed before arestg.om.
5text t_name "AREST-MROW"
6text t_mrow "mrow"
7fn arop q view ulong 256 nq ulong ny ulong o edit ulong 256 to ulong
8if or ne nq 3 not ckis 0 t_mrow
9ckbad
10end
11sn = mul get q 0 get q 2
12dn = mul get q 0 get q 1
13if or gt sn 408 gt dn 289
14ckbad
15end
16a = new ulong 3 0
17for i ulong 3
18put a i get q i
19end
20s = new f32 408 0.0f32
21for i ulong 408
22put s i f32 i
23end
24d = new f32 289 -1.0f32
25r = mrow a part s 0 sn part d 0 dn
26h = ardg0
27for i ulong dn bound 289
28h = ardg h ulong bitcast uint get d i
29end
30put o 0 h
31ret bitcast ulong r
32end