interplane.Get Omega
Read in your language

omega-bridge

Omega-first language interoperability: checked conversion backends and native language bindings

Brought by drakestapleton

branch main Branches Tags History

omega-bridge / tests / cabi / ext.om

14 lines · 493 bytes Raw Blame History
1note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2note cabi-1 fixture external unit: tools/bridge-seeded c emits omega_fx_sum, the symbol fixture.om imports through fx_ext.
3note fixture.om passes a uchar view span, a ulong edit span at element offset 0 and a ulong view span at element offset 3.
4fn fx_sum b view uchar 512 n ulong w edit ulong 3 v view ulong 3 k ulong to ulong
5s = k
6for j ulong n
7s = add s ulong get b j
8end
9for i ulong 3
10s = add s get v i
11put w i 7
12end
13ret s
14end