Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/gpu/nvidia/checks/plat_policy.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / gpu / nvidia / checks / plat_policy.om` 31 lines ยท 899 bytes Raw Blame History 1 note SPDX-License-Identifier: Apache-2.0 2 note gpu/nvidia/checks/plat_policy.om: the Omega port of CUDApp tests/platform_linux_policy.c. Composed after 3 note gpu/nvidia/om/platform-linux/plat_policy.om and gpu/nvidia/checks/lib.om; run with 4 note gpu/nvidia/checks/plat_policy.tsv, whose rows the C oracle plat_c wrote for every case of the old test. 5 note Case: NAME, m[0..15], WANT, q[0..15]. plat_policy m q, with q starting at zero, must return WANT and leave 6 note exactly q[0..15] in q (the old test's byte compare of the result and the whole reply). 7 text t_name "PLAT_POLICY" 8 fn cname to void 9 for i ulong len t_name bound 64 10 ckoc ulong get t_name i 11 end 12 end 13 fn crow to bool 14 if ne ckcnt 34 15 ckbad 16 end 17 m = new ulong 16 0 18 q = new ulong 16 0 19 for i ulong 16 20 put m i cknum add i 1 21 end 22 if ne plat_policy m q cknum 17 23 ret false 24 end 25 for i ulong 16 26 if ne get q i cknum add i 18 27 ret false 28 end 29 end 30 ret true 31 end