1use crate::deps::*;
4use crate::flint::*;
5use crate::fmpz_mod_types::*;
6use crate::fmpz_types::*;
7
8
9pub type fq_t = fmpz_poly_t;
10pub type fq_struct = fmpz_poly_struct;
11#[repr(C)]
12pub struct fq_ctx_struct {
13 pub ctxp: fmpz_mod_ctx_t,
14 pub sparse_modulus: libc::c_int,
15 pub is_conway: libc::c_int,
16 pub a: *mut fmpz,
17 pub j: *mut slong,
18 pub len: slong,
19 pub modulus: fmpz_mod_poly_t,
20 pub inv: fmpz_mod_poly_t,
21 pub var: *mut libc::c_char,
22}
23#[allow(clippy::unnecessary_operation, clippy::identity_op)]
24const _: () = {
25 ["Size of fq_ctx_struct"][::std::mem::size_of::<fq_ctx_struct>() - 200usize];
26 ["Alignment of fq_ctx_struct"][::std::mem::align_of::<fq_ctx_struct>() - 8usize];
27 ["Offset of field: fq_ctx_struct::ctxp"][::std::mem::offset_of!(fq_ctx_struct, ctxp) - 0usize];
28 ["Offset of field: fq_ctx_struct::sparse_modulus"]
29 [::std::mem::offset_of!(fq_ctx_struct, sparse_modulus) - 112usize];
30 ["Offset of field: fq_ctx_struct::is_conway"]
31 [::std::mem::offset_of!(fq_ctx_struct, is_conway) - 116usize];
32 ["Offset of field: fq_ctx_struct::a"][::std::mem::offset_of!(fq_ctx_struct, a) - 120usize];
33 ["Offset of field: fq_ctx_struct::j"][::std::mem::offset_of!(fq_ctx_struct, j) - 128usize];
34 ["Offset of field: fq_ctx_struct::len"][::std::mem::offset_of!(fq_ctx_struct, len) - 136usize];
35 ["Offset of field: fq_ctx_struct::modulus"]
36 [::std::mem::offset_of!(fq_ctx_struct, modulus) - 144usize];
37 ["Offset of field: fq_ctx_struct::inv"][::std::mem::offset_of!(fq_ctx_struct, inv) - 168usize];
38 ["Offset of field: fq_ctx_struct::var"][::std::mem::offset_of!(fq_ctx_struct, var) - 192usize];
39};
40impl Default for fq_ctx_struct {
41 fn default() -> Self {
42 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
43 unsafe {
44 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
45 s.assume_init()
46 }
47 }
48}
49pub type fq_ctx_t = [fq_ctx_struct; 1usize];
50#[repr(C)]
51pub struct fq_mat_struct {
52 pub entries: *mut fq_struct,
53 pub r: slong,
54 pub c: slong,
55 pub stride: slong,
56}
57#[allow(clippy::unnecessary_operation, clippy::identity_op)]
58const _: () = {
59 ["Size of fq_mat_struct"][::std::mem::size_of::<fq_mat_struct>() - 32usize];
60 ["Alignment of fq_mat_struct"][::std::mem::align_of::<fq_mat_struct>() - 8usize];
61 ["Offset of field: fq_mat_struct::entries"]
62 [::std::mem::offset_of!(fq_mat_struct, entries) - 0usize];
63 ["Offset of field: fq_mat_struct::r"][::std::mem::offset_of!(fq_mat_struct, r) - 8usize];
64 ["Offset of field: fq_mat_struct::c"][::std::mem::offset_of!(fq_mat_struct, c) - 16usize];
65 ["Offset of field: fq_mat_struct::stride"]
66 [::std::mem::offset_of!(fq_mat_struct, stride) - 24usize];
67};
68impl Default for fq_mat_struct {
69 fn default() -> Self {
70 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
71 unsafe {
72 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
73 s.assume_init()
74 }
75 }
76}
77pub type fq_mat_t = [fq_mat_struct; 1usize];
78#[repr(C)]
79pub struct fq_poly_struct {
80 pub coeffs: *mut fq_struct,
81 pub alloc: slong,
82 pub length: slong,
83}
84#[allow(clippy::unnecessary_operation, clippy::identity_op)]
85const _: () = {
86 ["Size of fq_poly_struct"][::std::mem::size_of::<fq_poly_struct>() - 24usize];
87 ["Alignment of fq_poly_struct"][::std::mem::align_of::<fq_poly_struct>() - 8usize];
88 ["Offset of field: fq_poly_struct::coeffs"]
89 [::std::mem::offset_of!(fq_poly_struct, coeffs) - 0usize];
90 ["Offset of field: fq_poly_struct::alloc"]
91 [::std::mem::offset_of!(fq_poly_struct, alloc) - 8usize];
92 ["Offset of field: fq_poly_struct::length"]
93 [::std::mem::offset_of!(fq_poly_struct, length) - 16usize];
94};
95impl Default for fq_poly_struct {
96 fn default() -> Self {
97 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
98 unsafe {
99 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
100 s.assume_init()
101 }
102 }
103}
104pub type fq_poly_t = [fq_poly_struct; 1usize];
105#[repr(C)]
106pub struct fq_poly_factor_struct {
107 pub poly: *mut fq_poly_struct,
108 pub exp: *mut slong,
109 pub num: slong,
110 pub alloc: slong,
111}
112#[allow(clippy::unnecessary_operation, clippy::identity_op)]
113const _: () = {
114 ["Size of fq_poly_factor_struct"][::std::mem::size_of::<fq_poly_factor_struct>() - 32usize];
115 ["Alignment of fq_poly_factor_struct"]
116 [::std::mem::align_of::<fq_poly_factor_struct>() - 8usize];
117 ["Offset of field: fq_poly_factor_struct::poly"]
118 [::std::mem::offset_of!(fq_poly_factor_struct, poly) - 0usize];
119 ["Offset of field: fq_poly_factor_struct::exp"]
120 [::std::mem::offset_of!(fq_poly_factor_struct, exp) - 8usize];
121 ["Offset of field: fq_poly_factor_struct::num"]
122 [::std::mem::offset_of!(fq_poly_factor_struct, num) - 16usize];
123 ["Offset of field: fq_poly_factor_struct::alloc"]
124 [::std::mem::offset_of!(fq_poly_factor_struct, alloc) - 24usize];
125};
126impl Default for fq_poly_factor_struct {
127 fn default() -> Self {
128 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
129 unsafe {
130 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
131 s.assume_init()
132 }
133 }
134}
135pub type fq_poly_factor_t = [fq_poly_factor_struct; 1usize];