flint_sys/
fq_nmod_types.rs1use crate::deps::*;
4use crate::flint::*;
5use crate::nmod_types::*;
6
7
8pub type fq_nmod_t = nmod_poly_t;
9pub type fq_nmod_struct = nmod_poly_struct;
10#[repr(C)]
11pub struct fq_nmod_ctx_struct {
12 pub mod_: nmod_t,
13 pub sparse_modulus: libc::c_int,
14 pub is_conway: libc::c_int,
15 pub a: *mut ulong,
16 pub j: *mut slong,
17 pub len: slong,
18 pub modulus: nmod_poly_t,
19 pub inv: nmod_poly_t,
20 pub var: *mut libc::c_char,
21}
22#[allow(clippy::unnecessary_operation, clippy::identity_op)]
23const _: () = {
24 ["Size of fq_nmod_ctx_struct"][::std::mem::size_of::<fq_nmod_ctx_struct>() - 160usize];
25 ["Alignment of fq_nmod_ctx_struct"][::std::mem::align_of::<fq_nmod_ctx_struct>() - 8usize];
26 ["Offset of field: fq_nmod_ctx_struct::mod_"]
27 [::std::mem::offset_of!(fq_nmod_ctx_struct, mod_) - 0usize];
28 ["Offset of field: fq_nmod_ctx_struct::sparse_modulus"]
29 [::std::mem::offset_of!(fq_nmod_ctx_struct, sparse_modulus) - 24usize];
30 ["Offset of field: fq_nmod_ctx_struct::is_conway"]
31 [::std::mem::offset_of!(fq_nmod_ctx_struct, is_conway) - 28usize];
32 ["Offset of field: fq_nmod_ctx_struct::a"]
33 [::std::mem::offset_of!(fq_nmod_ctx_struct, a) - 32usize];
34 ["Offset of field: fq_nmod_ctx_struct::j"]
35 [::std::mem::offset_of!(fq_nmod_ctx_struct, j) - 40usize];
36 ["Offset of field: fq_nmod_ctx_struct::len"]
37 [::std::mem::offset_of!(fq_nmod_ctx_struct, len) - 48usize];
38 ["Offset of field: fq_nmod_ctx_struct::modulus"]
39 [::std::mem::offset_of!(fq_nmod_ctx_struct, modulus) - 56usize];
40 ["Offset of field: fq_nmod_ctx_struct::inv"]
41 [::std::mem::offset_of!(fq_nmod_ctx_struct, inv) - 104usize];
42 ["Offset of field: fq_nmod_ctx_struct::var"]
43 [::std::mem::offset_of!(fq_nmod_ctx_struct, var) - 152usize];
44};
45impl Default for fq_nmod_ctx_struct {
46 fn default() -> Self {
47 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
48 unsafe {
49 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
50 s.assume_init()
51 }
52 }
53}
54pub type fq_nmod_ctx_t = [fq_nmod_ctx_struct; 1usize];
55#[repr(C)]
56pub struct fq_nmod_mat_struct {
57 pub entries: *mut fq_nmod_struct,
58 pub r: slong,
59 pub c: slong,
60 pub stride: slong,
61}
62#[allow(clippy::unnecessary_operation, clippy::identity_op)]
63const _: () = {
64 ["Size of fq_nmod_mat_struct"][::std::mem::size_of::<fq_nmod_mat_struct>() - 32usize];
65 ["Alignment of fq_nmod_mat_struct"][::std::mem::align_of::<fq_nmod_mat_struct>() - 8usize];
66 ["Offset of field: fq_nmod_mat_struct::entries"]
67 [::std::mem::offset_of!(fq_nmod_mat_struct, entries) - 0usize];
68 ["Offset of field: fq_nmod_mat_struct::r"]
69 [::std::mem::offset_of!(fq_nmod_mat_struct, r) - 8usize];
70 ["Offset of field: fq_nmod_mat_struct::c"]
71 [::std::mem::offset_of!(fq_nmod_mat_struct, c) - 16usize];
72 ["Offset of field: fq_nmod_mat_struct::stride"]
73 [::std::mem::offset_of!(fq_nmod_mat_struct, stride) - 24usize];
74};
75impl Default for fq_nmod_mat_struct {
76 fn default() -> Self {
77 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
78 unsafe {
79 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
80 s.assume_init()
81 }
82 }
83}
84pub type fq_nmod_mat_t = [fq_nmod_mat_struct; 1usize];
85#[repr(C)]
86pub struct fq_nmod_poly_struct {
87 pub coeffs: *mut fq_nmod_struct,
88 pub alloc: slong,
89 pub length: slong,
90}
91#[allow(clippy::unnecessary_operation, clippy::identity_op)]
92const _: () = {
93 ["Size of fq_nmod_poly_struct"][::std::mem::size_of::<fq_nmod_poly_struct>() - 24usize];
94 ["Alignment of fq_nmod_poly_struct"][::std::mem::align_of::<fq_nmod_poly_struct>() - 8usize];
95 ["Offset of field: fq_nmod_poly_struct::coeffs"]
96 [::std::mem::offset_of!(fq_nmod_poly_struct, coeffs) - 0usize];
97 ["Offset of field: fq_nmod_poly_struct::alloc"]
98 [::std::mem::offset_of!(fq_nmod_poly_struct, alloc) - 8usize];
99 ["Offset of field: fq_nmod_poly_struct::length"]
100 [::std::mem::offset_of!(fq_nmod_poly_struct, length) - 16usize];
101};
102impl Default for fq_nmod_poly_struct {
103 fn default() -> Self {
104 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
105 unsafe {
106 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
107 s.assume_init()
108 }
109 }
110}
111pub type fq_nmod_poly_t = [fq_nmod_poly_struct; 1usize];
112#[repr(C)]
113pub struct fq_nmod_poly_factor_struct {
114 pub poly: *mut fq_nmod_poly_struct,
115 pub exp: *mut slong,
116 pub num: slong,
117 pub alloc: slong,
118}
119#[allow(clippy::unnecessary_operation, clippy::identity_op)]
120const _: () = {
121 ["Size of fq_nmod_poly_factor_struct"]
122 [::std::mem::size_of::<fq_nmod_poly_factor_struct>() - 32usize];
123 ["Alignment of fq_nmod_poly_factor_struct"]
124 [::std::mem::align_of::<fq_nmod_poly_factor_struct>() - 8usize];
125 ["Offset of field: fq_nmod_poly_factor_struct::poly"]
126 [::std::mem::offset_of!(fq_nmod_poly_factor_struct, poly) - 0usize];
127 ["Offset of field: fq_nmod_poly_factor_struct::exp"]
128 [::std::mem::offset_of!(fq_nmod_poly_factor_struct, exp) - 8usize];
129 ["Offset of field: fq_nmod_poly_factor_struct::num"]
130 [::std::mem::offset_of!(fq_nmod_poly_factor_struct, num) - 16usize];
131 ["Offset of field: fq_nmod_poly_factor_struct::alloc"]
132 [::std::mem::offset_of!(fq_nmod_poly_factor_struct, alloc) - 24usize];
133};
134impl Default for fq_nmod_poly_factor_struct {
135 fn default() -> Self {
136 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
137 unsafe {
138 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
139 s.assume_init()
140 }
141 }
142}
143pub type fq_nmod_poly_factor_t = [fq_nmod_poly_factor_struct; 1usize];
144#[repr(C)]
145pub struct fq_nmod_mpoly_struct {
146 pub coeffs: *mut ulong,
147 pub exps: *mut ulong,
148 pub length: slong,
149 pub bits: flint_bitcnt_t,
150 pub coeffs_alloc: slong,
151 pub exps_alloc: slong,
152}
153#[allow(clippy::unnecessary_operation, clippy::identity_op)]
154const _: () = {
155 ["Size of fq_nmod_mpoly_struct"][::std::mem::size_of::<fq_nmod_mpoly_struct>() - 48usize];
156 ["Alignment of fq_nmod_mpoly_struct"][::std::mem::align_of::<fq_nmod_mpoly_struct>() - 8usize];
157 ["Offset of field: fq_nmod_mpoly_struct::coeffs"]
158 [::std::mem::offset_of!(fq_nmod_mpoly_struct, coeffs) - 0usize];
159 ["Offset of field: fq_nmod_mpoly_struct::exps"]
160 [::std::mem::offset_of!(fq_nmod_mpoly_struct, exps) - 8usize];
161 ["Offset of field: fq_nmod_mpoly_struct::length"]
162 [::std::mem::offset_of!(fq_nmod_mpoly_struct, length) - 16usize];
163 ["Offset of field: fq_nmod_mpoly_struct::bits"]
164 [::std::mem::offset_of!(fq_nmod_mpoly_struct, bits) - 24usize];
165 ["Offset of field: fq_nmod_mpoly_struct::coeffs_alloc"]
166 [::std::mem::offset_of!(fq_nmod_mpoly_struct, coeffs_alloc) - 32usize];
167 ["Offset of field: fq_nmod_mpoly_struct::exps_alloc"]
168 [::std::mem::offset_of!(fq_nmod_mpoly_struct, exps_alloc) - 40usize];
169};
170impl Default for fq_nmod_mpoly_struct {
171 fn default() -> Self {
172 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
173 unsafe {
174 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
175 s.assume_init()
176 }
177 }
178}
179pub type fq_nmod_mpoly_t = [fq_nmod_mpoly_struct; 1usize];