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-mstep.om

26 lines · 647 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-mstep.om: armstep (gpu/nvidia/om/apirest/mstep.om); Q is its 16 q words and then the words of x (uint each); q after the call is output 64 on. Composed before arest.om.
3text t_name "AREST-MSTEP"
4text t_au "mstep"
5fn arop q view ulong 64 nq ulong ny ulong o edit ulong 128 to ulong
6if or lt nq 16 ne ny 0
7ckbad
8end
9a = new ulong 16 0
10for i ulong 16
11put a i get q i
12end
13nx = sub nq 16
14x = new uint 48 0
15for i ulong nx bound 48
16if gt get q add 16 i 4294967295
17ckbad
18end
19put x i uint get q add 16 i
20end
21r = armstep a part x 0 nx
22for i ulong 16
23put o add 64 i get a i
24end
25ret r
26end