1use libc::*;
4use crate::deps::*;
5use crate::flint::*;
6use crate::fmpz_mod_types::*;
7use crate::fmpz_types::*;
8use crate::fq_default::*;
9use crate::fq_nmod_types::*;
10use crate::fq_types::*;
11use crate::fq_zech_types::*;
12use crate::nmod_types::*;
13
14
15#[repr(C)]
16pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
17impl<T> __BindgenUnionField<T> {
18 #[inline]
19 pub const fn new() -> Self {
20 __BindgenUnionField(::std::marker::PhantomData)
21 }
22 #[inline]
23 pub unsafe fn as_ref(&self) -> &T {
24 ::std::mem::transmute(self)
25 }
26 #[inline]
27 pub unsafe fn as_mut(&mut self) -> &mut T {
28 ::std::mem::transmute(self)
29 }
30}
31impl<T> ::std::default::Default for __BindgenUnionField<T> {
32 #[inline]
33 fn default() -> Self {
34 Self::new()
35 }
36}
37impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
38 #[inline]
39 fn clone(&self) -> Self {
40 *self
41 }
42}
43impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
44impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
45 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
46 fmt.write_str("__BindgenUnionField")
47 }
48}
49impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
50 fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
51}
52impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
53 fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
54 true
55 }
56}
57impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
58#[repr(C)]
59pub struct fq_default_mat_struct {
60 pub fq: __BindgenUnionField<fq_mat_t>,
61 pub fq_nmod: __BindgenUnionField<fq_nmod_mat_t>,
62 pub fq_zech: __BindgenUnionField<fq_zech_mat_t>,
63 pub nmod: __BindgenUnionField<nmod_mat_t>,
64 pub fmpz_mod: __BindgenUnionField<fmpz_mod_mat_t>,
65 pub bindgen_union_field: [u64; 7usize],
66}
67#[allow(clippy::unnecessary_operation, clippy::identity_op)]
68const _: () = {
69 ["Size of fq_default_mat_struct"][::std::mem::size_of::<fq_default_mat_struct>() - 56usize];
70 ["Alignment of fq_default_mat_struct"]
71 [::std::mem::align_of::<fq_default_mat_struct>() - 8usize];
72 ["Offset of field: fq_default_mat_struct::fq"]
73 [::std::mem::offset_of!(fq_default_mat_struct, fq) - 0usize];
74 ["Offset of field: fq_default_mat_struct::fq_nmod"]
75 [::std::mem::offset_of!(fq_default_mat_struct, fq_nmod) - 0usize];
76 ["Offset of field: fq_default_mat_struct::fq_zech"]
77 [::std::mem::offset_of!(fq_default_mat_struct, fq_zech) - 0usize];
78 ["Offset of field: fq_default_mat_struct::nmod"]
79 [::std::mem::offset_of!(fq_default_mat_struct, nmod) - 0usize];
80 ["Offset of field: fq_default_mat_struct::fmpz_mod"]
81 [::std::mem::offset_of!(fq_default_mat_struct, fmpz_mod) - 0usize];
82};
83impl Default for fq_default_mat_struct {
84 fn default() -> Self {
85 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
86 unsafe {
87 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
88 s.assume_init()
89 }
90 }
91}
92pub type fq_default_mat_t = [fq_default_mat_struct; 1usize];
93extern "C" {
94 #[link_name = "fq_default_mat_init__extern"]
95 pub fn fq_default_mat_init(
96 mat: *mut fq_default_mat_struct,
97 rows: slong,
98 cols: slong,
99 ctx: *const fq_default_ctx_struct,
100 );
101 #[link_name = "fq_default_mat_init_set__extern"]
102 pub fn fq_default_mat_init_set(
103 mat: *mut fq_default_mat_struct,
104 src: *const fq_default_mat_struct,
105 ctx: *const fq_default_ctx_struct,
106 );
107 #[link_name = "fq_default_mat_swap__extern"]
108 pub fn fq_default_mat_swap(
109 mat1: *mut fq_default_mat_struct,
110 mat2: *mut fq_default_mat_struct,
111 ctx: *const fq_default_ctx_struct,
112 );
113 #[link_name = "fq_default_mat_set__extern"]
114 pub fn fq_default_mat_set(
115 mat1: *mut fq_default_mat_struct,
116 mat2: *const fq_default_mat_struct,
117 ctx: *const fq_default_ctx_struct,
118 );
119 #[link_name = "fq_default_mat_clear__extern"]
120 pub fn fq_default_mat_clear(mat: *mut fq_default_mat_struct, ctx: *const fq_default_ctx_struct);
121 #[link_name = "fq_default_mat_equal__extern"]
122 pub fn fq_default_mat_equal(
123 mat1: *const fq_default_mat_struct,
124 mat2: *const fq_default_mat_struct,
125 ctx: *const fq_default_ctx_struct,
126 ) -> libc::c_int;
127 #[link_name = "fq_default_mat_is_zero__extern"]
128 pub fn fq_default_mat_is_zero(
129 mat: *const fq_default_mat_struct,
130 ctx: *const fq_default_ctx_struct,
131 ) -> libc::c_int;
132 #[link_name = "fq_default_mat_is_one__extern"]
133 pub fn fq_default_mat_is_one(
134 mat: *const fq_default_mat_struct,
135 ctx: *const fq_default_ctx_struct,
136 ) -> libc::c_int;
137 #[link_name = "fq_default_mat_is_empty__extern"]
138 pub fn fq_default_mat_is_empty(
139 mat: *const fq_default_mat_struct,
140 ctx: *const fq_default_ctx_struct,
141 ) -> libc::c_int;
142 #[link_name = "fq_default_mat_is_square__extern"]
143 pub fn fq_default_mat_is_square(
144 mat: *const fq_default_mat_struct,
145 ctx: *const fq_default_ctx_struct,
146 ) -> libc::c_int;
147 #[link_name = "fq_default_mat_transpose__extern"]
148 pub fn fq_default_mat_transpose(
149 B: *mut fq_default_mat_struct,
150 A: *const fq_default_mat_struct,
151 ctx: *const fq_default_ctx_struct,
152 );
153 #[link_name = "fq_default_mat_entry__extern"]
154 pub fn fq_default_mat_entry(
155 val: *mut fq_default_struct,
156 mat: *const fq_default_mat_struct,
157 i: slong,
158 j: slong,
159 ctx: *const fq_default_ctx_struct,
160 );
161 #[link_name = "fq_default_mat_entry_set__extern"]
162 pub fn fq_default_mat_entry_set(
163 mat: *mut fq_default_mat_struct,
164 i: slong,
165 j: slong,
166 x: *const fq_default_struct,
167 ctx: *const fq_default_ctx_struct,
168 );
169 #[link_name = "fq_default_mat_entry_set_fmpz__extern"]
170 pub fn fq_default_mat_entry_set_fmpz(
171 mat: *mut fq_default_mat_struct,
172 i: slong,
173 j: slong,
174 x: *const fmpz,
175 ctx: *const fq_default_ctx_struct,
176 );
177 #[link_name = "fq_default_mat_nrows__extern"]
178 pub fn fq_default_mat_nrows(
179 mat: *const fq_default_mat_struct,
180 ctx: *const fq_default_ctx_struct,
181 ) -> slong;
182 #[link_name = "fq_default_mat_ncols__extern"]
183 pub fn fq_default_mat_ncols(
184 mat: *const fq_default_mat_struct,
185 ctx: *const fq_default_ctx_struct,
186 ) -> slong;
187 #[link_name = "fq_default_mat_swap_rows__extern"]
188 pub fn fq_default_mat_swap_rows(
189 mat: *mut fq_default_mat_struct,
190 perm: *mut slong,
191 r: slong,
192 s: slong,
193 ctx: *const fq_default_ctx_struct,
194 );
195 #[link_name = "fq_default_mat_invert_rows__extern"]
196 pub fn fq_default_mat_invert_rows(
197 mat: *mut fq_default_mat_struct,
198 perm: *mut slong,
199 ctx: *const fq_default_ctx_struct,
200 );
201 #[link_name = "fq_default_mat_swap_cols__extern"]
202 pub fn fq_default_mat_swap_cols(
203 mat: *mut fq_default_mat_struct,
204 perm: *mut slong,
205 r: slong,
206 s: slong,
207 ctx: *const fq_default_ctx_struct,
208 );
209 #[link_name = "fq_default_mat_invert_cols__extern"]
210 pub fn fq_default_mat_invert_cols(
211 mat: *mut fq_default_mat_struct,
212 perm: *mut slong,
213 ctx: *const fq_default_ctx_struct,
214 );
215 #[link_name = "fq_default_mat_zero__extern"]
216 pub fn fq_default_mat_zero(A: *mut fq_default_mat_struct, ctx: *const fq_default_ctx_struct);
217 #[link_name = "fq_default_mat_one__extern"]
218 pub fn fq_default_mat_one(A: *mut fq_default_mat_struct, ctx: *const fq_default_ctx_struct);
219 #[link_name = "fq_default_mat_set_nmod_mat__extern"]
220 pub fn fq_default_mat_set_nmod_mat(
221 mat1: *mut fq_default_mat_struct,
222 mat2: *const nmod_mat_struct,
223 ctx: *const fq_default_ctx_struct,
224 );
225 #[link_name = "fq_default_mat_set_fmpz_mod_mat__extern"]
226 pub fn fq_default_mat_set_fmpz_mod_mat(
227 mat1: *mut fq_default_mat_struct,
228 mat2: *const fmpz_mod_mat_struct,
229 ctx: *const fq_default_ctx_struct,
230 );
231 #[link_name = "fq_default_mat_set_fmpz_mat__extern"]
232 pub fn fq_default_mat_set_fmpz_mat(
233 mat1: *mut fq_default_mat_struct,
234 mat2: *const fmpz_mat_struct,
235 ctx: *const fq_default_ctx_struct,
236 );
237 #[link_name = "fq_default_mat_window_init__extern"]
238 pub fn fq_default_mat_window_init(
239 window: *mut fq_default_mat_struct,
240 mat: *const fq_default_mat_struct,
241 r1: slong,
242 c1: slong,
243 r2: slong,
244 c2: slong,
245 ctx: *const fq_default_ctx_struct,
246 );
247 #[link_name = "fq_default_mat_window_clear__extern"]
248 pub fn fq_default_mat_window_clear(
249 window: *mut fq_default_mat_struct,
250 ctx: *const fq_default_ctx_struct,
251 );
252 #[link_name = "fq_default_mat_concat_horizontal__extern"]
253 pub fn fq_default_mat_concat_horizontal(
254 res: *mut fq_default_mat_struct,
255 mat1: *const fq_default_mat_struct,
256 mat2: *const fq_default_mat_struct,
257 ctx: *const fq_default_ctx_struct,
258 );
259 #[link_name = "fq_default_mat_concat_vertical__extern"]
260 pub fn fq_default_mat_concat_vertical(
261 res: *mut fq_default_mat_struct,
262 mat1: *const fq_default_mat_struct,
263 mat2: *const fq_default_mat_struct,
264 ctx: *const fq_default_ctx_struct,
265 );
266 pub fn fq_default_mat_fprint(
267 file: *mut FILE,
268 mat: *const fq_default_mat_struct,
269 ctx: *const fq_default_ctx_struct,
270 ) -> libc::c_int;
271 pub fn fq_default_mat_fprint_pretty(
272 file: *mut FILE,
273 mat: *const fq_default_mat_struct,
274 ctx: *const fq_default_ctx_struct,
275 ) -> libc::c_int;
276 pub fn fq_default_mat_print(
277 mat: *const fq_default_mat_struct,
278 ctx: *const fq_default_ctx_struct,
279 ) -> libc::c_int;
280 pub fn fq_default_mat_print_pretty(
281 mat: *const fq_default_mat_struct,
282 ctx: *const fq_default_ctx_struct,
283 ) -> libc::c_int;
284 #[link_name = "fq_default_mat_randtest__extern"]
285 pub fn fq_default_mat_randtest(
286 mat: *mut fq_default_mat_struct,
287 state: *mut flint_rand_struct,
288 ctx: *const fq_default_ctx_struct,
289 );
290 #[link_name = "fq_default_mat_randrank__extern"]
291 pub fn fq_default_mat_randrank(
292 mat: *mut fq_default_mat_struct,
293 state: *mut flint_rand_struct,
294 rank: slong,
295 ctx: *const fq_default_ctx_struct,
296 );
297 #[link_name = "fq_default_mat_randops__extern"]
298 pub fn fq_default_mat_randops(
299 mat: *mut fq_default_mat_struct,
300 state: *mut flint_rand_struct,
301 count: slong,
302 ctx: *const fq_default_ctx_struct,
303 );
304 #[link_name = "fq_default_mat_randtril__extern"]
305 pub fn fq_default_mat_randtril(
306 mat: *mut fq_default_mat_struct,
307 state: *mut flint_rand_struct,
308 unit: libc::c_int,
309 ctx: *const fq_default_ctx_struct,
310 );
311 #[link_name = "fq_default_mat_randtriu__extern"]
312 pub fn fq_default_mat_randtriu(
313 mat: *mut fq_default_mat_struct,
314 state: *mut flint_rand_struct,
315 unit: libc::c_int,
316 ctx: *const fq_default_ctx_struct,
317 );
318 #[link_name = "fq_default_mat_add__extern"]
319 pub fn fq_default_mat_add(
320 C: *mut fq_default_mat_struct,
321 A: *const fq_default_mat_struct,
322 B: *const fq_default_mat_struct,
323 ctx: *const fq_default_ctx_struct,
324 );
325 #[link_name = "fq_default_mat_sub__extern"]
326 pub fn fq_default_mat_sub(
327 C: *mut fq_default_mat_struct,
328 A: *const fq_default_mat_struct,
329 B: *const fq_default_mat_struct,
330 ctx: *const fq_default_ctx_struct,
331 );
332 #[link_name = "fq_default_mat_neg__extern"]
333 pub fn fq_default_mat_neg(
334 B: *mut fq_default_mat_struct,
335 A: *const fq_default_mat_struct,
336 ctx: *const fq_default_ctx_struct,
337 );
338 #[link_name = "fq_default_mat_submul__extern"]
339 pub fn fq_default_mat_submul(
340 D: *mut fq_default_mat_struct,
341 C: *const fq_default_mat_struct,
342 A: *const fq_default_mat_struct,
343 B: *const fq_default_mat_struct,
344 ctx: *const fq_default_ctx_struct,
345 );
346 #[link_name = "fq_default_mat_mul__extern"]
347 pub fn fq_default_mat_mul(
348 C: *mut fq_default_mat_struct,
349 A: *const fq_default_mat_struct,
350 B: *const fq_default_mat_struct,
351 ctx: *const fq_default_ctx_struct,
352 );
353 #[link_name = "fq_default_mat_lu__extern"]
354 pub fn fq_default_mat_lu(
355 P: *mut slong,
356 A: *mut fq_default_mat_struct,
357 rank_check: libc::c_int,
358 ctx: *const fq_default_ctx_struct,
359 ) -> slong;
360 #[link_name = "fq_default_mat_inv__extern"]
361 pub fn fq_default_mat_inv(
362 B: *mut fq_default_mat_struct,
363 A: *mut fq_default_mat_struct,
364 ctx: *const fq_default_ctx_struct,
365 ) -> libc::c_int;
366 #[link_name = "fq_default_mat_rref__extern"]
367 pub fn fq_default_mat_rref(
368 B: *mut fq_default_mat_struct,
369 A: *const fq_default_mat_struct,
370 ctx: *const fq_default_ctx_struct,
371 ) -> slong;
372 #[link_name = "fq_default_mat_nullspace__extern"]
373 pub fn fq_default_mat_nullspace(
374 X: *mut fq_default_mat_struct,
375 A: *const fq_default_mat_struct,
376 ctx: *const fq_default_ctx_struct,
377 ) -> slong;
378 #[link_name = "fq_default_mat_rank__extern"]
379 pub fn fq_default_mat_rank(
380 A: *const fq_default_mat_struct,
381 ctx: *const fq_default_ctx_struct,
382 ) -> slong;
383 #[link_name = "fq_default_mat_solve_tril__extern"]
384 pub fn fq_default_mat_solve_tril(
385 X: *mut fq_default_mat_struct,
386 L: *const fq_default_mat_struct,
387 B: *const fq_default_mat_struct,
388 unit: libc::c_int,
389 ctx: *const fq_default_ctx_struct,
390 );
391 #[link_name = "fq_default_mat_solve_triu__extern"]
392 pub fn fq_default_mat_solve_triu(
393 X: *mut fq_default_mat_struct,
394 U: *const fq_default_mat_struct,
395 B: *const fq_default_mat_struct,
396 unit: libc::c_int,
397 ctx: *const fq_default_ctx_struct,
398 );
399 #[link_name = "fq_default_mat_solve__extern"]
400 pub fn fq_default_mat_solve(
401 X: *mut fq_default_mat_struct,
402 A: *const fq_default_mat_struct,
403 C: *const fq_default_mat_struct,
404 ctx: *const fq_default_ctx_struct,
405 ) -> libc::c_int;
406 #[link_name = "fq_default_mat_can_solve__extern"]
407 pub fn fq_default_mat_can_solve(
408 X: *mut fq_default_mat_struct,
409 A: *const fq_default_mat_struct,
410 B: *const fq_default_mat_struct,
411 ctx: *const fq_default_ctx_struct,
412 ) -> libc::c_int;
413 #[link_name = "fq_default_mat_similarity__extern"]
414 pub fn fq_default_mat_similarity(
415 A: *mut fq_default_mat_struct,
416 r: slong,
417 d: *mut fq_default_struct,
418 ctx: *const fq_default_ctx_struct,
419 );
420}