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

32 lines · 997 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0
2note gpu/nvidia/checks/arest-copy.om: arcopy (gpu/nvidia/om/apirest/copy.om), as data_parts() of CUDApp
3note tests/api_rest_partitions.h calls it. Q n; bytes[i] = (unsigned char)i. The copy runs twice, into bytes that
4note are all 0 and into bytes that are all 255; outputs 0 and 1 are the digests of the n copied bytes, so a byte
5note the unit does not write differs from the table in one of them. Composed before arestg.om.
6text t_name "AREST-COPY"
7text t_copy "copy"
8fn ax_c x view uchar 65537 n ulong m uchar o edit ulong 256 k ulong to ulong
9y = new uchar 65537 m
10r = arcopy part x 0 n part y 0 n
11h = ardg0
12for i ulong n bound 65537
13h = ardg h ulong get y i
14end
15put o k h
16ret r
17end
18fn arop q view ulong 256 nq ulong ny ulong o edit ulong 256 to ulong
19n = get q 0
20if or or ne nq 1 gt n 65537 not ckis 0 t_copy
21ckbad
22end
23x = new uchar 65537 0
24for i ulong 65537
25put x i uchar and i 255
26end
27r = ax_c x n 0 o 0
28if ne ax_c x n 255 o 1 r
29ckbad
30end
31ret r
32end