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-bridge/blob/main/tests/native/reference.c # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / native / reference.c` 21 lines ยท 1387 bytes Raw Blame History 1 /* A hand-written statement of the seven test units' exported C signatures, from the contract in 2 * docs/NATIVE-ABI.md and the units' Omega signature lines, independent of the generator. 3 * tests/native/run.sh compiles this file with the generated omega_native.h included first: if the 4 * generator's declarations disagree with these, the compiler reports conflicting types. */ 5 #include 6 7 /* fn madd a ulong b ulong c ulong to ulong */ 8 uint32_t omega_madd(uint64_t *result, uint64_t a, uint64_t b, uint64_t c); 9 /* fn smadd a long b long c long to long */ 10 uint32_t omega_smadd(uint64_t *result, uint64_t a, uint64_t b, uint64_t c); 11 /* fn fill buf edit ulong 4 k ulong to ulong */ 12 uint32_t omega_fill(uint64_t *result, void *buf, uint64_t buf_len, uint64_t k); 13 /* fn spin n ulong to ulong */ 14 uint32_t omega_spin(uint64_t *result, uint64_t n); 15 /* fn mix a ulong b long c view uchar 3 d edit uchar 2 e view ulong 2 f ulong to void */ 16 uint32_t omega_mix(uint64_t *result, uint64_t a, uint64_t b, const void *c, uint64_t c_len, void *d, uint64_t d_len, 17 const void *e, uint64_t e_len, uint64_t f); 18 /* fn big n ulong to ulong */ 19 uint32_t omega_big(uint64_t *result, uint64_t n); 20 /* fn hsum a view uchar 4 b ulong to ulong (its last function; the two before it are private helpers) */ 21 uint32_t omega_hsum(uint64_t *result, const void *a, uint64_t a_len, uint64_t b);