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/om/codegen/cg_sentin.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 / om / codegen / cg_sentin.om` 55 lines ยท 1228 bytes Raw Blame History 1 om2 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note q={m,n,np,set-as-uint32,poison-f32-bits}; one last-real word per 16x8 output tile. 4 note Public view transports uint bits for the native OM2 integer ABI; equality remains private f32 equality. 5 fn st_last tile ulong width ulong lim ulong to ulong 6 x = add mul tile width sub width 1 7 if ge x lim 8 ret sub lim 1 9 end 10 ret x 11 end 12 fn st_one q view ulong 5 c edit uint * idx ulong to ulong 13 poison = uint get q 4 14 if ne get q 3 0 15 put c idx poison 16 ret ulong 1 17 end 18 if eq bitcast f32 get c idx bitcast f32 poison 19 ret ulong 1 20 end 21 ret ulong 0 22 end 23 fn st_row q view ulong 5 c edit uint * ti ulong to ulong 24 row = st_last ti 16 get q 0 25 count = ulong 0 26 nt = div and add get q 1 7 `4294967295` 8 27 for tj ulong nt 28 col = st_last tj 8 get q 1 29 idx = add mul row get q 2 col 30 count = add count st_one q c idx 31 end 32 ret count 33 end 34 fn sentin q view ulong 5 c edit uint * to ulong 35 for i ulong 5 36 if gt get q i `4294967295` 37 ret ulong 0 38 end 39 end 40 if gt get q 1 get q 2 41 ret ulong 0 42 end 43 if lt len c mul get q 0 get q 2 44 ret ulong 0 45 end 46 if or eq get q 0 0 eq get q 1 0 47 ret ulong 0 48 end 49 count = ulong 0 50 mt = div and add get q 0 15 `4294967295` 16 51 for ti ulong mt 52 count = add count st_row q c ti 53 end 54 ret count 55 end