interplane.Get Omega
Read in your language

CUDApp

CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.

Brought by drakestapleton

branch main Branches Tags History

CUDApp / om / no-posix / gen / x86linux / omega_api_defs.c

221 lines · 8723 bytes Raw Blame History
1/* Generated by omega-bridge src/native.om: the freestanding definitions of the C API declared in
2 * omega_api_decl.h (output fapic), for the freestanding binding (output freest). Each calls
3 * omega2_<name> and executes a trap instruction (__builtin_trap) on a nonzero status; it calls no C
4 * library function. Regenerate it; do not edit it. */
5#include "omega_api_decl.h"
6/* fn bw_enc_sm121 ins view ulong 8192 phys view ulong 288 n ulong pad ulong code edit uchar 16384 to ulong */
7uint64_t bw_enc_sm121(const uint64_t o_ins[8192], const uint64_t o_phys[288], uint64_t o_n, uint64_t o_pad, uint8_t o_code[16384])
8{
9 uint64_t r = 0;
10 if (omega2_bw_enc_sm121(&r, o_ins, 8192, o_phys, 288, (uint64_t)o_n, (uint64_t)o_pad, o_code, 16384) != OMEGA_OK)
11 __builtin_trap();
12 return r;
13}
14/* fn cubin_elf m view ulong 104 nm view uchar 64 tx view uchar 16777216 o edit ulong 16777216 to ulong */
15uint64_t cubin_elf(const uint64_t o_m[104], const uint8_t o_nm[64], const uint8_t o_tx[16777216], uint64_t o_o[16777216])
16{
17 uint64_t r = 0;
18 if (omega2_cubin_elf(&r, o_m, 104, o_nm, 64, o_tx, 16777216, o_o, 16777216) != OMEGA_OK)
19 __builtin_trap();
20 return r;
21}
22/* fn no_bf16 raw ulong to ulong */
23uint64_t no_bf16(uint64_t o_raw)
24{
25 uint64_t r = 0;
26 if (omega2_no_bf16(&r, (uint64_t)o_raw) != OMEGA_OK)
27 __builtin_trap();
28 return r;
29}
30/* fn bw_qmd op ulong m view ulong 16 q edit ulong 224 to ulong */
31uint64_t bw_qmd(uint64_t o_op, const uint64_t o_m[16], uint64_t o_q[224])
32{
33 uint64_t r = 0;
34 if (omega2_bw_qmd(&r, (uint64_t)o_op, o_m, 16, o_q, 224) != OMEGA_OK)
35 __builtin_trap();
36 return r;
37}
38/* fn amp_qmd op ulong a view ulong 16 q edit uchar 256 to ulong */
39uint64_t amp_qmd(uint64_t o_op, const uint64_t o_a[16], uint8_t o_q[256])
40{
41 uint64_t r = 0;
42 if (omega2_amp_qmd(&r, (uint64_t)o_op, o_a, 16, o_q, 256) != OMEGA_OK)
43 __builtin_trap();
44 return r;
45}
46/* fn decide op ulong a view ulong 16 o edit ulong 4 to ulong */
47uint64_t decide(uint64_t o_op, const uint64_t o_a[16], uint64_t o_o[4])
48{
49 uint64_t r = 0;
50 if (omega2_decide(&r, (uint64_t)o_op, o_a, 16, o_o, 4) != OMEGA_OK)
51 __builtin_trap();
52 return r;
53}
54/* fn emit op ulong a view ulong 16 o edit ulong 32 to ulong */
55uint64_t emit(uint64_t o_op, const uint64_t o_a[16], uint64_t o_o[32])
56{
57 uint64_t r = 0;
58 if (omega2_emit(&r, (uint64_t)o_op, o_a, 16, o_o, 32) != OMEGA_OK)
59 __builtin_trap();
60 return r;
61}
62/* fn scan idx view ulong 512 gen view ulong 512 want ulong wgen ulong to ulong */
63uint64_t scan(const uint64_t o_idx[512], const uint64_t o_gen[512], uint64_t o_want, uint64_t o_wgen)
64{
65 uint64_t r = 0;
66 if (omega2_scan(&r, o_idx, 512, o_gen, 512, (uint64_t)o_want, (uint64_t)o_wgen) != OMEGA_OK)
67 __builtin_trap();
68 return r;
69}
70/* fn book op ulong a view ulong 16 o edit ulong 4 to ulong */
71uint64_t book(uint64_t o_op, const uint64_t o_a[16], uint64_t o_o[4])
72{
73 uint64_t r = 0;
74 if (omega2_book(&r, (uint64_t)o_op, o_a, 16, o_o, 4) != OMEGA_OK)
75 __builtin_trap();
76 return r;
77}
78/* fn streams_words op ulong a view ulong 16 o edit ulong 32 to ulong */
79uint64_t streams_words(uint64_t o_op, const uint64_t o_a[16], uint64_t o_o[32])
80{
81 uint64_t r = 0;
82 if (omega2_streams_words(&r, (uint64_t)o_op, o_a, 16, o_o, 32) != OMEGA_OK)
83 __builtin_trap();
84 return r;
85}
86/* fn no_avbf md ulong raw ulong to ulong */
87uint64_t no_avbf(uint64_t o_md, uint64_t o_raw)
88{
89 uint64_t r = 0;
90 if (omega2_no_avbf(&r, (uint64_t)o_md, (uint64_t)o_raw) != OMEGA_OK)
91 __builtin_trap();
92 return r;
93}
94/* fn ra_run m edit ulong 4096 to long */
95int64_t ra_run(uint64_t o_m[4096])
96{
97 uint64_t r = 0;
98 if (omega2_ra_run(&r, o_m, 4096) != OMEGA_OK)
99 __builtin_trap();
100 return (int64_t)r;
101}
102/* fn ra_ir kind ulong a long b long to long */
103int64_t ra_ir(uint64_t o_kind, int64_t o_a, int64_t o_b)
104{
105 uint64_t r = 0;
106 if (omega2_ra_ir(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b) != OMEGA_OK)
107 __builtin_trap();
108 return (int64_t)r;
109}
110/* fn ra_live kind ulong a ulong b long c long d ulong e ulong to long */
111int64_t ra_live(uint64_t o_kind, uint64_t o_a, int64_t o_b, int64_t o_c, uint64_t o_d, uint64_t o_e)
112{
113 uint64_t r = 0;
114 if (omega2_ra_live(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, (uint64_t)o_d, (uint64_t)o_e) != OMEGA_OK)
115 __builtin_trap();
116 return (int64_t)r;
117}
118/* fn cg_matmul kind ulong a ulong b ulong c ulong to ulong */
119uint64_t cg_matmul(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c)
120{
121 uint64_t r = 0;
122 if (omega2_cg_matmul(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c) != OMEGA_OK)
123 __builtin_trap();
124 return r;
125}
126/* fn cg_par grid ulong u ulong r ulong c ulong mutant long to ulong */
127uint64_t cg_par(uint64_t o_grid, uint64_t o_u, uint64_t o_r, uint64_t o_c, int64_t o_mutant)
128{
129 uint64_t r = 0;
130 if (omega2_cg_par(&r, (uint64_t)o_grid, (uint64_t)o_u, (uint64_t)o_r, (uint64_t)o_c, (uint64_t)o_mutant) != OMEGA_OK)
131 __builtin_trap();
132 return r;
133}
134/* fn cg_i32 kind ulong a ulong b ulong c ulong i edit ulong 8192 m edit ulong 512 to ulong */
135uint64_t cg_i32(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c, uint64_t o_i[8192], uint64_t o_m[512])
136{
137 uint64_t r = 0;
138 if (omega2_cg_i32(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, o_i, 8192, o_m, 512) != OMEGA_OK)
139 __builtin_trap();
140 return r;
141}
142/* fn cg_tens kind ulong a ulong b ulong c ulong i edit ulong 8192 m edit ulong 512 to ulong */
143uint64_t cg_tens(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c, uint64_t o_i[8192], uint64_t o_m[512])
144{
145 uint64_t r = 0;
146 if (omega2_cg_tens(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, o_i, 8192, o_m, 512) != OMEGA_OK)
147 __builtin_trap();
148 return r;
149}
150/* fn cg_loop kind ulong a ulong b ulong c ulong i edit ulong 8192 m edit ulong 512 to ulong */
151uint64_t cg_loop(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c, uint64_t o_i[8192], uint64_t o_m[512])
152{
153 uint64_t r = 0;
154 if (omega2_cg_loop(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, o_i, 8192, o_m, 512) != OMEGA_OK)
155 __builtin_trap();
156 return r;
157}
158/* fn cg_frag kind ulong a ulong b ulong c ulong i edit ulong 8192 m edit ulong 512 to ulong */
159uint64_t cg_frag(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c, uint64_t o_i[8192], uint64_t o_m[512])
160{
161 uint64_t r = 0;
162 if (omega2_cg_frag(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, o_i, 8192, o_m, 512) != OMEGA_OK)
163 __builtin_trap();
164 return r;
165}
166/* fn cg_block kind ulong a ulong b ulong c ulong i edit ulong 8192 m edit ulong 512 to ulong */
167uint64_t cg_block(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint64_t o_c, uint64_t o_i[8192], uint64_t o_m[512])
168{
169 uint64_t r = 0;
170 if (omega2_cg_block(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, (uint64_t)o_c, o_i, 8192, o_m, 512) != OMEGA_OK)
171 __builtin_trap();
172 return r;
173}
174/* fn cg_vec d edit uchar 512 to long */
175int64_t cg_vec(uint8_t o_d[512])
176{
177 uint64_t r = 0;
178 if (omega2_cg_vec(&r, o_d, 512) != OMEGA_OK)
179 __builtin_trap();
180 return (int64_t)r;
181}
182/* fn cg_bind kind ulong a ulong b ulong w edit uchar 256 to long */
183int64_t cg_bind(uint64_t o_kind, uint64_t o_a, uint64_t o_b, uint8_t o_w[256])
184{
185 uint64_t r = 0;
186 if (omega2_cg_bind(&r, (uint64_t)o_kind, (uint64_t)o_a, (uint64_t)o_b, o_w, 256) != OMEGA_OK)
187 __builtin_trap();
188 return (int64_t)r;
189}
190/* fn cg_pklen p edit ulong 12 to long */
191int64_t cg_pklen(uint64_t o_p[12])
192{
193 uint64_t r = 0;
194 if (omega2_cg_pklen(&r, o_p, 12) != OMEGA_OK)
195 __builtin_trap();
196 return (int64_t)r;
197}
198/* fn cg_pkh p view ulong 12 s view uchar * d edit ushort * to long */
199int64_t cg_pkh(const uint64_t o_p[12], const uint8_t *o_s, size_t o_s_len, uint16_t *o_d, size_t o_d_len)
200{
201 uint64_t r = 0;
202 if (omega2_cg_pkh(&r, o_p, 12, o_s, o_s_len, o_d, o_d_len) != OMEGA_OK)
203 __builtin_trap();
204 return (int64_t)r;
205}
206/* fn sentin q view ulong 5 c edit uint * to ulong */
207uint64_t sentin(const uint64_t o_q[5], uint32_t *o_c, size_t o_c_len)
208{
209 uint64_t r = 0;
210 if (omega2_sentin(&r, o_q, 5, o_c, o_c_len) != OMEGA_OK)
211 __builtin_trap();
212 return r;
213}
214/* fn bw_id_native data view uchar 256 n ulong dst edit uchar 32 to long */
215int64_t bw_id_native(const uint8_t o_data[256], uint64_t o_n, uint8_t o_dst[32])
216{
217 uint64_t r = 0;
218 if (omega2_bw_id_native(&r, o_data, 256, (uint64_t)o_n, o_dst, 32) != OMEGA_OK)
219 __builtin_trap();
220 return (int64_t)r;
221}