1use crate::deps::*;
4use crate::flint::*;
5use crate::fmpz_types::*;
6use crate::mpoly_types::*;
7
8
9pub const MPOLY_GCD_USE_HENSEL: u32 = 1;
10pub const MPOLY_GCD_USE_BROWN: u32 = 2;
11pub const MPOLY_GCD_USE_ZIPPEL: u32 = 4;
12pub const MPOLY_GCD_USE_ZIPPEL2: u32 = 8;
13pub const MPOLY_GCD_USE_PRS: u32 = 16;
14pub const MPOLY_GCD_USE_ALL: u32 = 31;
15pub const MPOLY_FACTOR_USE_ZAS: u32 = 1;
16pub const MPOLY_FACTOR_USE_WANG: u32 = 2;
17pub const MPOLY_FACTOR_USE_ZIP: u32 = 4;
18pub const MPOLY_FACTOR_USE_ALL: u32 = 7;
19#[repr(C)]
20pub struct mpoly_heap_t {
21 pub i: ulong,
22 pub j: ulong,
23 pub next: *mut mpoly_heap_t,
24}
25#[allow(clippy::unnecessary_operation, clippy::identity_op)]
26const _: () = {
27 ["Size of mpoly_heap_t"][::std::mem::size_of::<mpoly_heap_t>() - 24usize];
28 ["Alignment of mpoly_heap_t"][::std::mem::align_of::<mpoly_heap_t>() - 8usize];
29 ["Offset of field: mpoly_heap_t::i"][::std::mem::offset_of!(mpoly_heap_t, i) - 0usize];
30 ["Offset of field: mpoly_heap_t::j"][::std::mem::offset_of!(mpoly_heap_t, j) - 8usize];
31 ["Offset of field: mpoly_heap_t::next"][::std::mem::offset_of!(mpoly_heap_t, next) - 16usize];
32};
33impl Default for mpoly_heap_t {
34 fn default() -> Self {
35 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
36 unsafe {
37 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
38 s.assume_init()
39 }
40 }
41}
42#[repr(C)]
43pub struct mpoly_nheap_t {
44 pub i: ulong,
45 pub j: ulong,
46 pub next: *mut mpoly_nheap_t,
47 pub p: slong,
48}
49#[allow(clippy::unnecessary_operation, clippy::identity_op)]
50const _: () = {
51 ["Size of mpoly_nheap_t"][::std::mem::size_of::<mpoly_nheap_t>() - 32usize];
52 ["Alignment of mpoly_nheap_t"][::std::mem::align_of::<mpoly_nheap_t>() - 8usize];
53 ["Offset of field: mpoly_nheap_t::i"][::std::mem::offset_of!(mpoly_nheap_t, i) - 0usize];
54 ["Offset of field: mpoly_nheap_t::j"][::std::mem::offset_of!(mpoly_nheap_t, j) - 8usize];
55 ["Offset of field: mpoly_nheap_t::next"][::std::mem::offset_of!(mpoly_nheap_t, next) - 16usize];
56 ["Offset of field: mpoly_nheap_t::p"][::std::mem::offset_of!(mpoly_nheap_t, p) - 24usize];
57};
58impl Default for mpoly_nheap_t {
59 fn default() -> Self {
60 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
61 unsafe {
62 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
63 s.assume_init()
64 }
65 }
66}
67#[repr(C)]
68pub struct mpoly_heap1_s {
69 pub exp: ulong,
70 pub next: *mut libc::c_void,
71}
72#[allow(clippy::unnecessary_operation, clippy::identity_op)]
73const _: () = {
74 ["Size of mpoly_heap1_s"][::std::mem::size_of::<mpoly_heap1_s>() - 16usize];
75 ["Alignment of mpoly_heap1_s"][::std::mem::align_of::<mpoly_heap1_s>() - 8usize];
76 ["Offset of field: mpoly_heap1_s::exp"][::std::mem::offset_of!(mpoly_heap1_s, exp) - 0usize];
77 ["Offset of field: mpoly_heap1_s::next"][::std::mem::offset_of!(mpoly_heap1_s, next) - 8usize];
78};
79impl Default for mpoly_heap1_s {
80 fn default() -> Self {
81 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
82 unsafe {
83 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
84 s.assume_init()
85 }
86 }
87}
88#[repr(C)]
89#[derive(Debug, Copy, Clone)]
90pub struct mpoly_heap_s {
91 pub exp: *mut ulong,
92 pub next: *mut libc::c_void,
93}
94#[allow(clippy::unnecessary_operation, clippy::identity_op)]
95const _: () = {
96 ["Size of mpoly_heap_s"][::std::mem::size_of::<mpoly_heap_s>() - 16usize];
97 ["Alignment of mpoly_heap_s"][::std::mem::align_of::<mpoly_heap_s>() - 8usize];
98 ["Offset of field: mpoly_heap_s::exp"][::std::mem::offset_of!(mpoly_heap_s, exp) - 0usize];
99 ["Offset of field: mpoly_heap_s::next"][::std::mem::offset_of!(mpoly_heap_s, next) - 8usize];
100};
101impl Default for mpoly_heap_s {
102 fn default() -> Self {
103 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
104 unsafe {
105 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
106 s.assume_init()
107 }
108 }
109}
110#[repr(C)]
111pub struct mpoly_rbnode_ui_struct {
112 pub key: ulong,
113 pub up: slong,
114 pub left: slong,
115 pub right: slong,
116 pub color: libc::c_int,
117}
118#[allow(clippy::unnecessary_operation, clippy::identity_op)]
119const _: () = {
120 ["Size of mpoly_rbnode_ui_struct"][::std::mem::size_of::<mpoly_rbnode_ui_struct>() - 40usize];
121 ["Alignment of mpoly_rbnode_ui_struct"]
122 [::std::mem::align_of::<mpoly_rbnode_ui_struct>() - 8usize];
123 ["Offset of field: mpoly_rbnode_ui_struct::key"]
124 [::std::mem::offset_of!(mpoly_rbnode_ui_struct, key) - 0usize];
125 ["Offset of field: mpoly_rbnode_ui_struct::up"]
126 [::std::mem::offset_of!(mpoly_rbnode_ui_struct, up) - 8usize];
127 ["Offset of field: mpoly_rbnode_ui_struct::left"]
128 [::std::mem::offset_of!(mpoly_rbnode_ui_struct, left) - 16usize];
129 ["Offset of field: mpoly_rbnode_ui_struct::right"]
130 [::std::mem::offset_of!(mpoly_rbnode_ui_struct, right) - 24usize];
131 ["Offset of field: mpoly_rbnode_ui_struct::color"]
132 [::std::mem::offset_of!(mpoly_rbnode_ui_struct, color) - 32usize];
133};
134impl Default for mpoly_rbnode_ui_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}
143#[repr(C)]
144pub struct mpoly_rbtree_ui_struct {
145 pub length: slong,
146 pub nodes: *mut mpoly_rbnode_ui_struct,
147 pub node_alloc: slong,
148 pub data: *mut libc::c_char,
149 pub data_alloc: slong,
150 pub data_size: slong,
151}
152#[allow(clippy::unnecessary_operation, clippy::identity_op)]
153const _: () = {
154 ["Size of mpoly_rbtree_ui_struct"][::std::mem::size_of::<mpoly_rbtree_ui_struct>() - 48usize];
155 ["Alignment of mpoly_rbtree_ui_struct"]
156 [::std::mem::align_of::<mpoly_rbtree_ui_struct>() - 8usize];
157 ["Offset of field: mpoly_rbtree_ui_struct::length"]
158 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, length) - 0usize];
159 ["Offset of field: mpoly_rbtree_ui_struct::nodes"]
160 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, nodes) - 8usize];
161 ["Offset of field: mpoly_rbtree_ui_struct::node_alloc"]
162 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, node_alloc) - 16usize];
163 ["Offset of field: mpoly_rbtree_ui_struct::data"]
164 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, data) - 24usize];
165 ["Offset of field: mpoly_rbtree_ui_struct::data_alloc"]
166 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, data_alloc) - 32usize];
167 ["Offset of field: mpoly_rbtree_ui_struct::data_size"]
168 [::std::mem::offset_of!(mpoly_rbtree_ui_struct, data_size) - 40usize];
169};
170impl Default for mpoly_rbtree_ui_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 mpoly_rbtree_ui_t = [mpoly_rbtree_ui_struct; 1usize];
180#[repr(C)]
181pub struct mpoly_rbnode_fmpz_struct {
182 pub key: fmpz_t,
183 pub up: slong,
184 pub left: slong,
185 pub right: slong,
186 pub color: libc::c_int,
187}
188#[allow(clippy::unnecessary_operation, clippy::identity_op)]
189const _: () = {
190 ["Size of mpoly_rbnode_fmpz_struct"]
191 [::std::mem::size_of::<mpoly_rbnode_fmpz_struct>() - 40usize];
192 ["Alignment of mpoly_rbnode_fmpz_struct"]
193 [::std::mem::align_of::<mpoly_rbnode_fmpz_struct>() - 8usize];
194 ["Offset of field: mpoly_rbnode_fmpz_struct::key"]
195 [::std::mem::offset_of!(mpoly_rbnode_fmpz_struct, key) - 0usize];
196 ["Offset of field: mpoly_rbnode_fmpz_struct::up"]
197 [::std::mem::offset_of!(mpoly_rbnode_fmpz_struct, up) - 8usize];
198 ["Offset of field: mpoly_rbnode_fmpz_struct::left"]
199 [::std::mem::offset_of!(mpoly_rbnode_fmpz_struct, left) - 16usize];
200 ["Offset of field: mpoly_rbnode_fmpz_struct::right"]
201 [::std::mem::offset_of!(mpoly_rbnode_fmpz_struct, right) - 24usize];
202 ["Offset of field: mpoly_rbnode_fmpz_struct::color"]
203 [::std::mem::offset_of!(mpoly_rbnode_fmpz_struct, color) - 32usize];
204};
205impl Default for mpoly_rbnode_fmpz_struct {
206 fn default() -> Self {
207 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
208 unsafe {
209 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
210 s.assume_init()
211 }
212 }
213}
214#[repr(C)]
215pub struct mpoly_rbtree_fmpz_struct {
216 pub length: slong,
217 pub nodes: *mut mpoly_rbnode_fmpz_struct,
218 pub node_alloc: slong,
219 pub data: *mut libc::c_char,
220 pub data_alloc: slong,
221 pub data_size: slong,
222}
223#[allow(clippy::unnecessary_operation, clippy::identity_op)]
224const _: () = {
225 ["Size of mpoly_rbtree_fmpz_struct"]
226 [::std::mem::size_of::<mpoly_rbtree_fmpz_struct>() - 48usize];
227 ["Alignment of mpoly_rbtree_fmpz_struct"]
228 [::std::mem::align_of::<mpoly_rbtree_fmpz_struct>() - 8usize];
229 ["Offset of field: mpoly_rbtree_fmpz_struct::length"]
230 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, length) - 0usize];
231 ["Offset of field: mpoly_rbtree_fmpz_struct::nodes"]
232 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, nodes) - 8usize];
233 ["Offset of field: mpoly_rbtree_fmpz_struct::node_alloc"]
234 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, node_alloc) - 16usize];
235 ["Offset of field: mpoly_rbtree_fmpz_struct::data"]
236 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, data) - 24usize];
237 ["Offset of field: mpoly_rbtree_fmpz_struct::data_alloc"]
238 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, data_alloc) - 32usize];
239 ["Offset of field: mpoly_rbtree_fmpz_struct::data_size"]
240 [::std::mem::offset_of!(mpoly_rbtree_fmpz_struct, data_size) - 40usize];
241};
242impl Default for mpoly_rbtree_fmpz_struct {
243 fn default() -> Self {
244 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
245 unsafe {
246 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
247 s.assume_init()
248 }
249 }
250}
251pub type mpoly_rbtree_fmpz_t = [mpoly_rbtree_fmpz_struct; 1usize];
252#[repr(C)]
253pub struct mpoly_univar_struct {
254 pub coeffs: *mut libc::c_char,
255 pub exps: *mut fmpz,
256 pub length: slong,
257 pub alloc: slong,
258}
259#[allow(clippy::unnecessary_operation, clippy::identity_op)]
260const _: () = {
261 ["Size of mpoly_univar_struct"][::std::mem::size_of::<mpoly_univar_struct>() - 32usize];
262 ["Alignment of mpoly_univar_struct"][::std::mem::align_of::<mpoly_univar_struct>() - 8usize];
263 ["Offset of field: mpoly_univar_struct::coeffs"]
264 [::std::mem::offset_of!(mpoly_univar_struct, coeffs) - 0usize];
265 ["Offset of field: mpoly_univar_struct::exps"]
266 [::std::mem::offset_of!(mpoly_univar_struct, exps) - 8usize];
267 ["Offset of field: mpoly_univar_struct::length"]
268 [::std::mem::offset_of!(mpoly_univar_struct, length) - 16usize];
269 ["Offset of field: mpoly_univar_struct::alloc"]
270 [::std::mem::offset_of!(mpoly_univar_struct, alloc) - 24usize];
271};
272impl Default for mpoly_univar_struct {
273 fn default() -> Self {
274 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
275 unsafe {
276 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
277 s.assume_init()
278 }
279 }
280}
281pub type mpoly_univar_t = [mpoly_univar_struct; 1usize];
282#[repr(C)]
283pub struct string_with_length_struct {
284 pub str_: *mut libc::c_char,
285 pub str_len: slong,
286}
287#[allow(clippy::unnecessary_operation, clippy::identity_op)]
288const _: () = {
289 ["Size of string_with_length_struct"]
290 [::std::mem::size_of::<string_with_length_struct>() - 16usize];
291 ["Alignment of string_with_length_struct"]
292 [::std::mem::align_of::<string_with_length_struct>() - 8usize];
293 ["Offset of field: string_with_length_struct::str_"]
294 [::std::mem::offset_of!(string_with_length_struct, str_) - 0usize];
295 ["Offset of field: string_with_length_struct::str_len"]
296 [::std::mem::offset_of!(string_with_length_struct, str_len) - 8usize];
297};
298impl Default for string_with_length_struct {
299 fn default() -> Self {
300 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
301 unsafe {
302 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
303 s.assume_init()
304 }
305 }
306}
307#[repr(C)]
308pub struct mpoly_parse_struct {
309 pub R: mpoly_void_ring_t,
310 pub stack: *mut slong,
311 pub stack_len: slong,
312 pub stack_alloc: slong,
313 pub estore: *mut libc::c_char,
314 pub estore_len: slong,
315 pub estore_alloc: slong,
316 pub tmp: *mut libc::c_void,
317 pub terminal_strings: *mut string_with_length_struct,
318 pub terminal_values: *mut libc::c_char,
319 pub terminals_alloc: slong,
320 pub terminals_len: slong,
321}
322#[allow(clippy::unnecessary_operation, clippy::identity_op)]
323const _: () = {
324 ["Size of mpoly_parse_struct"][::std::mem::size_of::<mpoly_parse_struct>() - 240usize];
325 ["Alignment of mpoly_parse_struct"][::std::mem::align_of::<mpoly_parse_struct>() - 8usize];
326 ["Offset of field: mpoly_parse_struct::R"]
327 [::std::mem::offset_of!(mpoly_parse_struct, R) - 0usize];
328 ["Offset of field: mpoly_parse_struct::stack"]
329 [::std::mem::offset_of!(mpoly_parse_struct, stack) - 152usize];
330 ["Offset of field: mpoly_parse_struct::stack_len"]
331 [::std::mem::offset_of!(mpoly_parse_struct, stack_len) - 160usize];
332 ["Offset of field: mpoly_parse_struct::stack_alloc"]
333 [::std::mem::offset_of!(mpoly_parse_struct, stack_alloc) - 168usize];
334 ["Offset of field: mpoly_parse_struct::estore"]
335 [::std::mem::offset_of!(mpoly_parse_struct, estore) - 176usize];
336 ["Offset of field: mpoly_parse_struct::estore_len"]
337 [::std::mem::offset_of!(mpoly_parse_struct, estore_len) - 184usize];
338 ["Offset of field: mpoly_parse_struct::estore_alloc"]
339 [::std::mem::offset_of!(mpoly_parse_struct, estore_alloc) - 192usize];
340 ["Offset of field: mpoly_parse_struct::tmp"]
341 [::std::mem::offset_of!(mpoly_parse_struct, tmp) - 200usize];
342 ["Offset of field: mpoly_parse_struct::terminal_strings"]
343 [::std::mem::offset_of!(mpoly_parse_struct, terminal_strings) - 208usize];
344 ["Offset of field: mpoly_parse_struct::terminal_values"]
345 [::std::mem::offset_of!(mpoly_parse_struct, terminal_values) - 216usize];
346 ["Offset of field: mpoly_parse_struct::terminals_alloc"]
347 [::std::mem::offset_of!(mpoly_parse_struct, terminals_alloc) - 224usize];
348 ["Offset of field: mpoly_parse_struct::terminals_len"]
349 [::std::mem::offset_of!(mpoly_parse_struct, terminals_len) - 232usize];
350};
351impl Default for mpoly_parse_struct {
352 fn default() -> Self {
353 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
354 unsafe {
355 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
356 s.assume_init()
357 }
358 }
359}
360pub type mpoly_parse_t = [mpoly_parse_struct; 1usize];
361extern "C" {
362 pub fn mpoly_divide_threads(n: slong, la: f64, lb: f64) -> slong;
363 pub fn mpoly_ctx_init(ctx: *mut mpoly_ctx_struct, nvars: slong, ord: ordering_t);
364 pub fn mpoly_ctx_init_rand(
365 mctx: *mut mpoly_ctx_struct,
366 state: *mut flint_rand_struct,
367 max_nvars: slong,
368 );
369 pub fn mpoly_monomial_randbits_fmpz(
370 exp: *mut fmpz,
371 state: *mut flint_rand_struct,
372 exp_bits: flint_bitcnt_t,
373 mctx: *const mpoly_ctx_struct,
374 );
375 pub fn mpoly_ctx_clear(UNUSED_mctx: *mut mpoly_ctx_struct);
376 #[link_name = "mpoly_words_per_exp_sp__extern"]
377 pub fn mpoly_words_per_exp_sp(bits: flint_bitcnt_t, mctx: *const mpoly_ctx_struct) -> slong;
378 #[link_name = "mpoly_words_per_exp_mp__extern"]
379 pub fn mpoly_words_per_exp_mp(bits: flint_bitcnt_t, mctx: *const mpoly_ctx_struct) -> slong;
380 #[link_name = "mpoly_words_per_exp__extern"]
381 pub fn mpoly_words_per_exp(bits: flint_bitcnt_t, mctx: *const mpoly_ctx_struct) -> slong;
382 #[link_name = "mpoly_fix_bits__extern"]
383 pub fn mpoly_fix_bits(bits: flint_bitcnt_t, mctx: *const mpoly_ctx_struct) -> flint_bitcnt_t;
384 pub fn mpoly_rbtree_ui_init(T: *mut mpoly_rbtree_ui_struct, data_size: slong);
385 pub fn mpoly_rbtree_ui_clear(T: *mut mpoly_rbtree_ui_struct);
386 pub fn mpoly_rbtree_ui_lookup(
387 T: *mut mpoly_rbtree_ui_struct,
388 its_new: *mut libc::c_int,
389 key: ulong,
390 ) -> *mut libc::c_void;
391 #[link_name = "mpoly_rbtree_ui_head__extern"]
392 pub fn mpoly_rbtree_ui_head(T: *const mpoly_rbtree_ui_struct) -> slong;
393 pub fn mpoly_rbtree_fmpz_init(T: *mut mpoly_rbtree_fmpz_struct, data_size: slong);
394 pub fn mpoly_rbtree_fmpz_clear(T: *mut mpoly_rbtree_fmpz_struct);
395 pub fn mpoly_rbtree_fmpz_lookup(
396 T: *mut mpoly_rbtree_fmpz_struct,
397 its_new: *mut libc::c_int,
398 key: *const fmpz,
399 ) -> *mut libc::c_void;
400 #[link_name = "mpoly_rbtree_fmpz_head__extern"]
401 pub fn mpoly_rbtree_fmpz_head(T: *const mpoly_rbtree_fmpz_struct) -> slong;
402 #[link_name = "mpoly_ordering_randtest__extern"]
403 pub fn mpoly_ordering_randtest(state: *mut flint_rand_struct) -> ordering_t;
404 #[link_name = "mpoly_ordering_isdeg__extern"]
405 pub fn mpoly_ordering_isdeg(mctx: *const mpoly_ctx_struct) -> libc::c_int;
406 #[link_name = "mpoly_ordering_isrev__extern"]
407 pub fn mpoly_ordering_isrev(mctx: *const mpoly_ctx_struct) -> libc::c_int;
408 pub fn mpoly_ordering_print(ord: ordering_t);
409 #[link_name = "mpoly_monomial_zero__extern"]
410 pub fn mpoly_monomial_zero(exp_ptr: *mut ulong, N: slong);
411 #[link_name = "mpoly_monomial_add__extern"]
412 pub fn mpoly_monomial_add(
413 exp_ptr: *mut ulong,
414 exp2: *const ulong,
415 exp3: *const ulong,
416 N: slong,
417 );
418 #[link_name = "mpoly_monomial_add_mp__extern"]
419 pub fn mpoly_monomial_add_mp(
420 exp_ptr: *mut ulong,
421 exp2: *const ulong,
422 exp3: *const ulong,
423 N: slong,
424 );
425 #[link_name = "mpoly_monomial_sub__extern"]
426 pub fn mpoly_monomial_sub(
427 exp_ptr: *mut ulong,
428 exp2: *const ulong,
429 exp3: *const ulong,
430 N: slong,
431 );
432 #[link_name = "mpoly_monomial_sub_mp__extern"]
433 pub fn mpoly_monomial_sub_mp(
434 exp_ptr: *mut ulong,
435 exp2: *const ulong,
436 exp3: *const ulong,
437 N: slong,
438 );
439 #[link_name = "mpoly_monomial_madd__extern"]
440 pub fn mpoly_monomial_madd(
441 exp1: *mut ulong,
442 exp2: *const ulong,
443 scalar: ulong,
444 exp3: *const ulong,
445 N: slong,
446 );
447 #[link_name = "mpoly_monomial_madd_mp__extern"]
448 pub fn mpoly_monomial_madd_mp(
449 exp1: *mut ulong,
450 exp2: *const ulong,
451 scalar: ulong,
452 exp3: *const ulong,
453 N: slong,
454 );
455 #[link_name = "mpoly_monomial_madd_inplace_mp__extern"]
456 pub fn mpoly_monomial_madd_inplace_mp(
457 exp12: *mut ulong,
458 scalar: ulong,
459 exp3: *const ulong,
460 N: slong,
461 );
462 #[link_name = "mpoly_monomial_msub__extern"]
463 pub fn mpoly_monomial_msub(
464 exp1: *mut ulong,
465 exp2: *const ulong,
466 scalar: ulong,
467 exp3: *const ulong,
468 N: slong,
469 );
470 #[link_name = "mpoly_monomial_msub_mp__extern"]
471 pub fn mpoly_monomial_msub_mp(
472 exp1: *mut ulong,
473 exp2: *const ulong,
474 scalar: ulong,
475 exp3: *const ulong,
476 N: slong,
477 );
478 pub fn mpoly_monomial_msub_ui_array(
479 exp1: *mut ulong,
480 exp2: *const ulong,
481 scalar: *const ulong,
482 scalar_limbs: slong,
483 exp3: *const ulong,
484 N: slong,
485 );
486 pub fn mpoly_monomial_madd_ui_array(
487 exp1: *mut ulong,
488 exp2: *const ulong,
489 scalar: *const ulong,
490 scalar_limbs: slong,
491 exp3: *const ulong,
492 N: slong,
493 );
494 #[link_name = "mpoly_monomial_madd_fmpz__extern"]
495 pub fn mpoly_monomial_madd_fmpz(
496 exp1: *mut ulong,
497 exp2: *const ulong,
498 scalar: *const fmpz,
499 exp3: *const ulong,
500 N: slong,
501 );
502 #[link_name = "mpoly_overflow_mask_sp__extern"]
503 pub fn mpoly_overflow_mask_sp(bits: flint_bitcnt_t) -> ulong;
504 #[link_name = "mpoly_monomial_max1__extern"]
505 pub fn mpoly_monomial_max1(
506 exp2: ulong,
507 exp3: ulong,
508 bits: flint_bitcnt_t,
509 mask: ulong,
510 ) -> ulong;
511 pub fn mpoly_monomial_max(
512 exp1: *mut ulong,
513 exp2: *const ulong,
514 exp3: *const ulong,
515 bits: flint_bitcnt_t,
516 N: slong,
517 mask: ulong,
518 );
519 #[link_name = "mpoly_monomial_min1__extern"]
520 pub fn mpoly_monomial_min1(
521 exp2: ulong,
522 exp3: ulong,
523 bits: flint_bitcnt_t,
524 mask: ulong,
525 ) -> ulong;
526 pub fn mpoly_monomial_min(
527 exp1: *mut ulong,
528 exp2: *const ulong,
529 exp3: *const ulong,
530 bits: flint_bitcnt_t,
531 N: slong,
532 mask: ulong,
533 );
534 pub fn mpoly_monomial_max_mp(
535 exp1: *mut ulong,
536 exp2: *const ulong,
537 exp3: *const ulong,
538 bits: flint_bitcnt_t,
539 N: slong,
540 );
541 pub fn mpoly_monomial_min_mp(
542 exp1: *mut ulong,
543 exp2: *const ulong,
544 exp3: *const ulong,
545 bits: flint_bitcnt_t,
546 N: slong,
547 );
548 #[link_name = "mpoly_monomial_overflows__extern"]
549 pub fn mpoly_monomial_overflows(exp2: *mut ulong, N: slong, mask: ulong) -> libc::c_int;
550 #[link_name = "mpoly_monomial_overflows_mp__extern"]
551 pub fn mpoly_monomial_overflows_mp(
552 exp_ptr: *mut ulong,
553 N: slong,
554 bits: flint_bitcnt_t,
555 ) -> libc::c_int;
556 #[link_name = "mpoly_monomial_overflows1__extern"]
557 pub fn mpoly_monomial_overflows1(exp: ulong, mask: ulong) -> libc::c_int;
558 #[link_name = "mpoly_monomial_divides__extern"]
559 pub fn mpoly_monomial_divides(
560 exp_ptr: *mut ulong,
561 exp2: *const ulong,
562 exp3: *const ulong,
563 N: slong,
564 mask: ulong,
565 ) -> libc::c_int;
566 #[link_name = "mpoly_monomial_halves__extern"]
567 pub fn mpoly_monomial_halves(
568 exp_ptr: *mut ulong,
569 exp2: *const ulong,
570 N: slong,
571 mask: ulong,
572 ) -> libc::c_int;
573 #[link_name = "mpoly_monomial_divides_mp__extern"]
574 pub fn mpoly_monomial_divides_mp(
575 exp_ptr: *mut ulong,
576 exp2: *const ulong,
577 exp3: *const ulong,
578 N: slong,
579 bits: flint_bitcnt_t,
580 ) -> libc::c_int;
581 #[link_name = "mpoly_monomial_halves_mp__extern"]
582 pub fn mpoly_monomial_halves_mp(
583 exp_ptr: *mut ulong,
584 exp2: *const ulong,
585 N: slong,
586 bits: flint_bitcnt_t,
587 ) -> libc::c_int;
588 #[link_name = "mpoly_monomial_divides_test__extern"]
589 pub fn mpoly_monomial_divides_test(
590 exp2: *const ulong,
591 exp3: *const ulong,
592 N: slong,
593 mask: ulong,
594 ) -> libc::c_int;
595 #[link_name = "mpoly_monomial_divides_mp_test__extern"]
596 pub fn mpoly_monomial_divides_mp_test(
597 exp2: *const ulong,
598 exp3: *const ulong,
599 N: slong,
600 bits: flint_bitcnt_t,
601 ) -> libc::c_int;
602 #[link_name = "mpoly_monomial_divides1__extern"]
603 pub fn mpoly_monomial_divides1(
604 exp_ptr: *mut ulong,
605 exp2: ulong,
606 exp3: ulong,
607 mask: ulong,
608 ) -> libc::c_int;
609 #[link_name = "mpoly_monomial_halves1__extern"]
610 pub fn mpoly_monomial_halves1(exp_ptr: *mut ulong, exp2: ulong, mask: ulong) -> libc::c_int;
611 #[link_name = "mpoly_monomial_set__extern"]
612 pub fn mpoly_monomial_set(exp2: *mut ulong, exp3: *const ulong, N: slong);
613 #[link_name = "mpoly_monomial_set_extra__extern"]
614 pub fn mpoly_monomial_set_extra(
615 exp2: *mut ulong,
616 exp3: *const ulong,
617 N: slong,
618 offset: slong,
619 extra: ulong,
620 );
621 pub fn mpoly_copy_monomials(exp1: *mut ulong, exp2: *const ulong, len: slong, N: slong);
622 #[link_name = "mpoly_monomial_swap__extern"]
623 pub fn mpoly_monomial_swap(exp2: *mut ulong, exp3: *mut ulong, N: slong);
624 #[link_name = "mpoly_monomial_mul_ui__extern"]
625 pub fn mpoly_monomial_mul_ui(exp2: *mut ulong, exp3: *const ulong, N: slong, c: ulong);
626 #[link_name = "mpoly_monomial_mul_ui_mp__extern"]
627 pub fn mpoly_monomial_mul_ui_mp(exp2: *mut ulong, exp3: *const ulong, N: slong, c: ulong);
628 pub fn mpoly_monomial_mul_fmpz(exp2: *mut ulong, exp3: *const ulong, N: slong, c: *const fmpz);
629 #[link_name = "mpoly_monomial_is_zero__extern"]
630 pub fn mpoly_monomial_is_zero(exp: *const ulong, N: slong) -> libc::c_int;
631 #[link_name = "mpoly_monomial_equal__extern"]
632 pub fn mpoly_monomial_equal(exp2: *const ulong, exp3: *const ulong, N: slong) -> libc::c_int;
633 #[link_name = "mpoly_monomial_equal_extra__extern"]
634 pub fn mpoly_monomial_equal_extra(
635 exp2: *const ulong,
636 exp3: *const ulong,
637 N: slong,
638 offset: slong,
639 extra: ulong,
640 ) -> libc::c_int;
641 #[link_name = "mpoly_monomial_cmp1__extern"]
642 pub fn mpoly_monomial_cmp1(a: ulong, b: ulong, cmpmask: ulong) -> libc::c_int;
643 #[link_name = "mpoly_monomial_gt1__extern"]
644 pub fn mpoly_monomial_gt1(a: ulong, b: ulong, cmpmask: ulong) -> libc::c_int;
645 #[link_name = "mpoly_monomial_ge1__extern"]
646 pub fn mpoly_monomial_ge1(a: ulong, b: ulong, cmpmask: ulong) -> libc::c_int;
647 #[link_name = "mpoly_monomial_lt__extern"]
648 pub fn mpoly_monomial_lt(
649 exp3: *const ulong,
650 exp2: *const ulong,
651 N: slong,
652 cmpmask: *const ulong,
653 ) -> libc::c_int;
654 #[link_name = "mpoly_monomial_gt__extern"]
655 pub fn mpoly_monomial_gt(
656 exp3: *const ulong,
657 exp2: *const ulong,
658 N: slong,
659 cmpmask: *const ulong,
660 ) -> libc::c_int;
661 #[link_name = "mpoly_monomial_lt_nomask__extern"]
662 pub fn mpoly_monomial_lt_nomask(
663 exp2: *const ulong,
664 exp3: *const ulong,
665 N: slong,
666 ) -> libc::c_int;
667 #[link_name = "mpoly_monomial_gt_nomask__extern"]
668 pub fn mpoly_monomial_gt_nomask(
669 exp2: *const ulong,
670 exp3: *const ulong,
671 N: slong,
672 ) -> libc::c_int;
673 #[link_name = "mpoly_monomial_lt_nomask_extra__extern"]
674 pub fn mpoly_monomial_lt_nomask_extra(
675 exp2: *const ulong,
676 exp3: *const ulong,
677 N: slong,
678 offset: slong,
679 extra: ulong,
680 ) -> libc::c_int;
681 #[link_name = "mpoly_monomial_gt_nomask_extra__extern"]
682 pub fn mpoly_monomial_gt_nomask_extra(
683 exp2: *const ulong,
684 exp3: *const ulong,
685 N: slong,
686 offset: slong,
687 extra: ulong,
688 ) -> libc::c_int;
689 #[link_name = "mpoly_monomial_cmp__extern"]
690 pub fn mpoly_monomial_cmp(
691 exp2: *const ulong,
692 exp3: *const ulong,
693 N: slong,
694 cmpmask: *const ulong,
695 ) -> libc::c_int;
696 #[link_name = "mpoly_monomial_cmp_nomask__extern"]
697 pub fn mpoly_monomial_cmp_nomask(
698 exp2: *const ulong,
699 exp3: *const ulong,
700 N: slong,
701 ) -> libc::c_int;
702 #[link_name = "mpoly_monomial_cmp_nomask_extra__extern"]
703 pub fn mpoly_monomial_cmp_nomask_extra(
704 exp2: *const ulong,
705 exp3: *const ulong,
706 N: slong,
707 offset: slong,
708 extra: ulong,
709 ) -> libc::c_int;
710 #[link_name = "mpoly_monomial_divides_tight__extern"]
711 pub fn mpoly_monomial_divides_tight(
712 e1: slong,
713 e2: slong,
714 prods: *mut slong,
715 num: slong,
716 ) -> libc::c_int;
717 #[link_name = "mpoly_max_degrees_tight__extern"]
718 pub fn mpoly_max_degrees_tight(
719 max_exp: *mut slong,
720 exps: *mut ulong,
721 len: slong,
722 prods: *mut slong,
723 num: slong,
724 );
725 #[link_name = "pack_exp2__extern"]
726 pub fn pack_exp2(e0: ulong, e1: ulong) -> ulong;
727 #[link_name = "pack_exp3__extern"]
728 pub fn pack_exp3(e0: ulong, e1: ulong, e2: ulong) -> ulong;
729 #[link_name = "extract_exp__extern"]
730 pub fn extract_exp(e: ulong, idx: libc::c_int, nvars: libc::c_int) -> ulong;
731 pub fn _mpoly_bidegree(
732 Aexps: *const ulong,
733 Abits: flint_bitcnt_t,
734 mctx: *const mpoly_ctx_struct,
735 ) -> ulong;
736 pub fn mpoly_gen_fields_ui(exp: *mut ulong, var: slong, mctx: *const mpoly_ctx_struct);
737 pub fn mpoly_gen_fields_fmpz(exp: *mut fmpz, var: slong, mctx: *const mpoly_ctx_struct);
738 pub fn mpoly_gen_bits_required(
739 UNUSED_var: slong,
740 UNUSED_mctx: *const mpoly_ctx_struct,
741 ) -> flint_bitcnt_t;
742 #[link_name = "mpoly_gen_index__extern"]
743 pub fn mpoly_gen_index(v: slong, mctx: *const mpoly_ctx_struct) -> slong;
744 pub fn mpoly_gen_offset_shift_sp(
745 offset: *mut slong,
746 shift: *mut slong,
747 var: slong,
748 bits: flint_bitcnt_t,
749 mctx: *const mpoly_ctx_struct,
750 );
751 pub fn mpoly_gen_monomial_offset_shift_sp(
752 mexp: *mut ulong,
753 offset: *mut slong,
754 shift: *mut slong,
755 var: slong,
756 bits: flint_bitcnt_t,
757 mctx: *const mpoly_ctx_struct,
758 );
759 pub fn mpoly_gen_monomial_sp(
760 oneexp: *mut ulong,
761 var: slong,
762 bits: flint_bitcnt_t,
763 mctx: *const mpoly_ctx_struct,
764 );
765 pub fn mpoly_gen_offset_mp(
766 var: slong,
767 bits: flint_bitcnt_t,
768 mctx: *const mpoly_ctx_struct,
769 ) -> slong;
770 pub fn mpoly_gen_monomial_offset_mp(
771 mexp: *mut ulong,
772 var: slong,
773 bits: flint_bitcnt_t,
774 mctx: *const mpoly_ctx_struct,
775 ) -> slong;
776 pub fn mpoly_compose_mat_gen(
777 M: *mut fmpz_mat_struct,
778 c: *const slong,
779 mctxB: *const mpoly_ctx_struct,
780 mctxAC: *const mpoly_ctx_struct,
781 );
782 pub fn mpoly_compose_mat_fill_column(
783 M: *mut fmpz_mat_struct,
784 Cexp: *const ulong,
785 Cbits: flint_bitcnt_t,
786 Bvar: slong,
787 mctxB: *const mpoly_ctx_struct,
788 mctxAC: *const mpoly_ctx_struct,
789 );
790 pub fn mpoly_get_cmpmask(
791 cmpmask: *mut ulong,
792 N: slong,
793 bits: flint_bitcnt_t,
794 mctx: *const mpoly_ctx_struct,
795 );
796 pub fn mpoly_get_ovfmask(
797 ovfmask: *mut ulong,
798 N: slong,
799 bits: flint_bitcnt_t,
800 mctx: *const mpoly_ctx_struct,
801 );
802 pub fn mpoly_monomials_cmp(
803 Aexps: *const ulong,
804 Abits: flint_bitcnt_t,
805 Bexps: *const ulong,
806 Bbits: flint_bitcnt_t,
807 length: slong,
808 mctx: *const mpoly_ctx_struct,
809 ) -> libc::c_int;
810 pub fn mpoly_exp_bits_required_ui(
811 user_exp: *const ulong,
812 mctx: *const mpoly_ctx_struct,
813 ) -> flint_bitcnt_t;
814 pub fn mpoly_exp_bits_required_ffmpz(
815 user_exp: *const fmpz,
816 mctx: *const mpoly_ctx_struct,
817 ) -> flint_bitcnt_t;
818 pub fn mpoly_exp_bits_required_pfmpz(
819 user_exp: *const *mut fmpz,
820 mctx: *const mpoly_ctx_struct,
821 ) -> flint_bitcnt_t;
822 pub fn mpoly_gen_pow_exp_bits_required(
823 UNUSED_v: slong,
824 e: ulong,
825 UNUSED_mctx: *const mpoly_ctx_struct,
826 ) -> flint_bitcnt_t;
827 pub fn mpoly_is_poly(
828 Aexps: *const ulong,
829 Alen: slong,
830 Abits: flint_bitcnt_t,
831 var: slong,
832 mctx: *const mpoly_ctx_struct,
833 ) -> libc::c_int;
834 pub fn mpoly_pack_vec_ui(
835 exp1: *mut ulong,
836 exp2: *const ulong,
837 bits: flint_bitcnt_t,
838 nfields: slong,
839 len: slong,
840 );
841 pub fn mpoly_pack_vec_fmpz(
842 exp1: *mut ulong,
843 exp2: *const fmpz,
844 bits: flint_bitcnt_t,
845 nfields: slong,
846 len: slong,
847 );
848 pub fn mpoly_unpack_vec_ui(
849 exp1: *mut ulong,
850 exp2: *const ulong,
851 bits: flint_bitcnt_t,
852 nfields: slong,
853 len: slong,
854 );
855 pub fn mpoly_unpack_vec_fmpz(
856 exp1: *mut fmpz,
857 exp2: *const ulong,
858 bits: flint_bitcnt_t,
859 nfields: slong,
860 len: slong,
861 );
862 pub fn mpoly_get_monomial_ui_unpacked_ui(
863 user_exps: *mut ulong,
864 poly_exps: *const ulong,
865 mctx: *const mpoly_ctx_struct,
866 );
867 pub fn mpoly_get_monomial_ui_unpacked_ffmpz(
868 user_exps: *mut ulong,
869 poly_exps: *const fmpz,
870 mctx: *const mpoly_ctx_struct,
871 );
872 pub fn mpoly_get_monomial_ffmpz_unpacked_ffmpz(
873 user_exps: *mut fmpz,
874 poly_exps: *const fmpz,
875 mctx: *const mpoly_ctx_struct,
876 );
877 pub fn mpoly_get_monomial_pfmpz_unpacked_ffmpz(
878 user_exps: *mut *mut fmpz,
879 poly_exps: *const fmpz,
880 mctx: *const mpoly_ctx_struct,
881 );
882 pub fn mpoly_get_monomial_ui_sp(
883 user_exps: *mut ulong,
884 poly_exps: *const ulong,
885 bits: flint_bitcnt_t,
886 mctx: *const mpoly_ctx_struct,
887 );
888 pub fn mpoly_get_monomial_si_mp(
889 user_exps: *mut slong,
890 poly_exps: *const ulong,
891 bits: flint_bitcnt_t,
892 mctx: *const mpoly_ctx_struct,
893 );
894 pub fn mpoly_get_monomial_ui_mp(
895 user_exps: *mut ulong,
896 poly_exps: *const ulong,
897 bits: flint_bitcnt_t,
898 mctx: *const mpoly_ctx_struct,
899 );
900 #[link_name = "mpoly_get_monomial_ui__extern"]
901 pub fn mpoly_get_monomial_ui(
902 user_exps: *mut ulong,
903 poly_exps: *const ulong,
904 bits: flint_bitcnt_t,
905 mctx: *const mpoly_ctx_struct,
906 );
907 #[link_name = "mpoly_get_monomial_si__extern"]
908 pub fn mpoly_get_monomial_si(
909 user_exps: *mut slong,
910 poly_exps: *const ulong,
911 bits: flint_bitcnt_t,
912 mctx: *const mpoly_ctx_struct,
913 );
914 pub fn mpoly_get_monomial_var_exp_ui_sp(
915 poly_exps: *const ulong,
916 var: slong,
917 bits: flint_bitcnt_t,
918 mctx: *const mpoly_ctx_struct,
919 ) -> ulong;
920 pub fn mpoly_get_monomial_var_exp_si_mp(
921 poly_exps: *const ulong,
922 var: slong,
923 bits: flint_bitcnt_t,
924 mctx: *const mpoly_ctx_struct,
925 ) -> slong;
926 pub fn mpoly_get_monomial_var_exp_ui_mp(
927 poly_exps: *const ulong,
928 var: slong,
929 bits: flint_bitcnt_t,
930 mctx: *const mpoly_ctx_struct,
931 ) -> ulong;
932 #[link_name = "mpoly_get_monomial_var_exp_ui__extern"]
933 pub fn mpoly_get_monomial_var_exp_ui(
934 poly_exps: *const ulong,
935 var: slong,
936 bits: flint_bitcnt_t,
937 mctx: *const mpoly_ctx_struct,
938 ) -> ulong;
939 #[link_name = "mpoly_get_monomial_var_exp_si__extern"]
940 pub fn mpoly_get_monomial_var_exp_si(
941 poly_exps: *const ulong,
942 var: slong,
943 bits: flint_bitcnt_t,
944 mctx: *const mpoly_ctx_struct,
945 ) -> slong;
946 pub fn mpoly_get_monomial_ffmpz(
947 exps: *mut fmpz,
948 poly_exps: *const ulong,
949 bits: flint_bitcnt_t,
950 mctx: *const mpoly_ctx_struct,
951 );
952 pub fn mpoly_get_monomial_pfmpz(
953 exps: *mut *mut fmpz,
954 poly_exps: *const ulong,
955 bits: flint_bitcnt_t,
956 mctx: *const mpoly_ctx_struct,
957 );
958 pub fn mpoly_set_monomial_ui(
959 exp1: *mut ulong,
960 exp2: *const ulong,
961 bits: flint_bitcnt_t,
962 mctx: *const mpoly_ctx_struct,
963 );
964 pub fn mpoly_set_monomial_ffmpz(
965 exp1: *mut ulong,
966 exp2: *const fmpz,
967 bits: flint_bitcnt_t,
968 mctx: *const mpoly_ctx_struct,
969 );
970 pub fn mpoly_set_monomial_pfmpz(
971 exp1: *mut ulong,
972 exp2: *const *mut fmpz,
973 bits: flint_bitcnt_t,
974 mctx: *const mpoly_ctx_struct,
975 );
976 pub fn mpoly_repack_monomials(
977 exps1: *mut ulong,
978 bits1: flint_bitcnt_t,
979 exps2: *const ulong,
980 bits2: flint_bitcnt_t,
981 len: slong,
982 mctx: *const mpoly_ctx_struct,
983 ) -> libc::c_int;
984 pub fn mpoly_pack_monomials_tight(
985 exp1: *mut ulong,
986 exp2: *const ulong,
987 len: slong,
988 mults: *const slong,
989 num: slong,
990 bits: slong,
991 );
992 pub fn mpoly_unpack_monomials_tight(
993 e1: *mut ulong,
994 e2: *mut ulong,
995 len: slong,
996 mults: *mut slong,
997 num: slong,
998 bits: slong,
999 );
1000 pub fn mpoly_monomial_exists(
1001 index: *mut slong,
1002 poly_exps: *const ulong,
1003 exp: *const ulong,
1004 len: slong,
1005 N: slong,
1006 cmpmask: *const ulong,
1007 ) -> libc::c_int;
1008 pub fn mpoly_monomial_index1_nomask(Aexps: *mut ulong, Alen: slong, e: ulong) -> slong;
1009 pub fn mpoly_monomial_index_ui(
1010 Aexp: *const ulong,
1011 Abits: flint_bitcnt_t,
1012 Alength: slong,
1013 exp: *const ulong,
1014 mctx: *const mpoly_ctx_struct,
1015 ) -> slong;
1016 pub fn mpoly_monomial_index_pfmpz(
1017 Aexp: *const ulong,
1018 Abits: flint_bitcnt_t,
1019 Alength: slong,
1020 exp: *const *mut fmpz,
1021 mctx: *const mpoly_ctx_struct,
1022 ) -> slong;
1023 pub fn mpoly_monomial_index_monomial(
1024 Aexp: *const ulong,
1025 Abits: flint_bitcnt_t,
1026 Alength: slong,
1027 Mexp: *const ulong,
1028 Mbits: flint_bitcnt_t,
1029 mctx: *const mpoly_ctx_struct,
1030 ) -> slong;
1031 pub fn mpoly_min_fields_ui_sp(
1032 min_fields: *mut ulong,
1033 poly_exps: *const ulong,
1034 len: slong,
1035 bits: flint_bitcnt_t,
1036 mctx: *const mpoly_ctx_struct,
1037 );
1038 pub fn mpoly_min_fields_fmpz(
1039 min_fields: *mut fmpz,
1040 poly_exps: *const ulong,
1041 len: slong,
1042 bits: flint_bitcnt_t,
1043 mctx: *const mpoly_ctx_struct,
1044 );
1045 pub fn mpoly_max_fields_ui_sp(
1046 max_fields: *mut ulong,
1047 poly_exps: *const ulong,
1048 len: slong,
1049 bits: flint_bitcnt_t,
1050 mctx: *const mpoly_ctx_struct,
1051 );
1052 pub fn mpoly_max_fields_fmpz(
1053 max_fields: *mut fmpz,
1054 poly_exps: *const ulong,
1055 len: slong,
1056 bits: flint_bitcnt_t,
1057 mctx: *const mpoly_ctx_struct,
1058 );
1059 pub fn mpoly_degrees_fit_si(
1060 poly_exps: *const ulong,
1061 len: slong,
1062 bits: flint_bitcnt_t,
1063 mctx: *const mpoly_ctx_struct,
1064 ) -> libc::c_int;
1065 pub fn mpoly_degrees_si(
1066 user_degs: *mut slong,
1067 poly_exps: *const ulong,
1068 len: slong,
1069 bits: flint_bitcnt_t,
1070 mctx: *const mpoly_ctx_struct,
1071 );
1072 pub fn mpoly_degrees_si_threaded(
1073 user_degs: *mut slong,
1074 poly_exps: *const ulong,
1075 len: slong,
1076 bits: flint_bitcnt_t,
1077 mctx: *const mpoly_ctx_struct,
1078 handles: *const thread_pool_handle,
1079 num_handles: slong,
1080 );
1081 pub fn mpoly_degrees_ffmpz(
1082 user_degs: *mut fmpz,
1083 poly_exps: *const ulong,
1084 len: slong,
1085 bits: flint_bitcnt_t,
1086 mctx: *const mpoly_ctx_struct,
1087 );
1088 pub fn mpoly_degrees_pfmpz(
1089 user_degs: *mut *mut fmpz,
1090 poly_exps: *const ulong,
1091 len: slong,
1092 bits: flint_bitcnt_t,
1093 mctx: *const mpoly_ctx_struct,
1094 );
1095 pub fn mpoly_degree_si(
1096 poly_exps: *const ulong,
1097 len: slong,
1098 bits: flint_bitcnt_t,
1099 var: slong,
1100 mctx: *const mpoly_ctx_struct,
1101 ) -> slong;
1102 pub fn mpoly_degree_fmpz(
1103 deg: *mut fmpz,
1104 poly_exps: *const ulong,
1105 len: slong,
1106 bits: flint_bitcnt_t,
1107 var: slong,
1108 mctx: *const mpoly_ctx_struct,
1109 );
1110 pub fn mpoly_total_degree_fits_si(
1111 exps: *const ulong,
1112 len: slong,
1113 bits: flint_bitcnt_t,
1114 mctx: *const mpoly_ctx_struct,
1115 ) -> libc::c_int;
1116 pub fn mpoly_total_degree_si(
1117 exps: *const ulong,
1118 len: slong,
1119 bits: flint_bitcnt_t,
1120 mctx: *const mpoly_ctx_struct,
1121 ) -> slong;
1122 pub fn mpoly_total_degree_fmpz(
1123 totdeg: *mut fmpz,
1124 exps: *const ulong,
1125 len: slong,
1126 bits: flint_bitcnt_t,
1127 mctx: *const mpoly_ctx_struct,
1128 );
1129 pub fn mpoly_total_degree_fmpz_ref(
1130 totdeg: *mut fmpz,
1131 exps: *const ulong,
1132 len: slong,
1133 bits: flint_bitcnt_t,
1134 mctx: *const mpoly_ctx_struct,
1135 );
1136 pub fn mpoly_used_vars_or(
1137 used: *mut libc::c_int,
1138 exps: *const ulong,
1139 len: slong,
1140 bits: flint_bitcnt_t,
1141 mctx: *const mpoly_ctx_struct,
1142 );
1143 pub fn mpoly_monomial_cmp_general(
1144 Aexp: *mut ulong,
1145 Abits: flint_bitcnt_t,
1146 Bexp: *mut ulong,
1147 Bbits: flint_bitcnt_t,
1148 mctx: *const mpoly_ctx_struct,
1149 ) -> libc::c_int;
1150 pub fn mpoly_search_monomials(
1151 e_ind: *mut *mut slong,
1152 e: *mut ulong,
1153 e_score: *mut slong,
1154 t1: *mut slong,
1155 t2: *mut slong,
1156 t3: *mut slong,
1157 lower: slong,
1158 upper: slong,
1159 a: *const ulong,
1160 a_len: slong,
1161 b: *const ulong,
1162 b_len: slong,
1163 N: slong,
1164 cmpmask: *const ulong,
1165 );
1166 pub fn mpoly_main_variable_split_LEX(
1167 ind: *mut slong,
1168 pexp: *mut ulong,
1169 Aexp: *const ulong,
1170 l1: slong,
1171 Alen: slong,
1172 mults: *const ulong,
1173 num: slong,
1174 Abits: slong,
1175 );
1176 pub fn mpoly_main_variable_split_DEG(
1177 ind: *mut slong,
1178 pexp: *mut ulong,
1179 Aexp: *const ulong,
1180 l1: slong,
1181 Alen: slong,
1182 deg: ulong,
1183 num: slong,
1184 Abits: slong,
1185 );
1186 pub fn mpoly_term_exp_fits_si(
1187 exps: *mut ulong,
1188 bits: flint_bitcnt_t,
1189 n: slong,
1190 mctx: *const mpoly_ctx_struct,
1191 ) -> libc::c_int;
1192 pub fn mpoly_term_exp_fits_ui(
1193 exps: *mut ulong,
1194 bits: flint_bitcnt_t,
1195 n: slong,
1196 mctx: *const mpoly_ctx_struct,
1197 ) -> libc::c_int;
1198 pub fn mpoly_is_gen(
1199 exps: *mut ulong,
1200 var: slong,
1201 bits: flint_bitcnt_t,
1202 mctx: *const mpoly_ctx_struct,
1203 ) -> libc::c_int;
1204 pub fn mpoly_monomials_valid_test(
1205 exps: *mut ulong,
1206 len: slong,
1207 bits: flint_bitcnt_t,
1208 mctx: *const mpoly_ctx_struct,
1209 ) -> libc::c_int;
1210 pub fn mpoly_monomials_overflow_test(
1211 exps: *mut ulong,
1212 len: slong,
1213 bits: flint_bitcnt_t,
1214 mctx: *const mpoly_ctx_struct,
1215 ) -> libc::c_int;
1216 pub fn mpoly_monomials_inorder_test(
1217 exps: *mut ulong,
1218 len: slong,
1219 bits: flint_bitcnt_t,
1220 mctx: *const mpoly_ctx_struct,
1221 ) -> libc::c_int;
1222 pub fn mpoly_reverse(Aexp: *mut ulong, Bexp: *const ulong, len: slong, N: slong);
1223 pub fn mpoly_monomials_deflation(
1224 shift: *mut fmpz,
1225 stride: *mut fmpz,
1226 Aexps: *const ulong,
1227 Abits: flint_bitcnt_t,
1228 Alength: slong,
1229 mctx: *const mpoly_ctx_struct,
1230 );
1231 pub fn mpoly_monomials_deflate(
1232 Aexps: *mut ulong,
1233 Abits: flint_bitcnt_t,
1234 Bexps: *const ulong,
1235 Bbits: flint_bitcnt_t,
1236 Blength: slong,
1237 shift: *const fmpz,
1238 stride: *const fmpz,
1239 mctx: *const mpoly_ctx_struct,
1240 );
1241 pub fn mpoly_monomials_inflate(
1242 Aexps: *mut ulong,
1243 Abits: flint_bitcnt_t,
1244 Bexps: *const ulong,
1245 Bbits: flint_bitcnt_t,
1246 Blength: slong,
1247 shift: *const fmpz,
1248 stride: *const fmpz,
1249 mctx: *const mpoly_ctx_struct,
1250 );
1251 pub fn _mpoly_gen_shift_right(
1252 Aexp: *mut ulong,
1253 Abits: flint_bitcnt_t,
1254 Alength: slong,
1255 var: slong,
1256 amount: ulong,
1257 mctx: *const mpoly_ctx_struct,
1258 );
1259 pub fn _mpoly_gen_shift_right_fmpz(
1260 Aexp: *mut ulong,
1261 Abits: flint_bitcnt_t,
1262 Alength: slong,
1263 var: slong,
1264 amount: *const fmpz,
1265 mctx: *const mpoly_ctx_struct,
1266 );
1267 pub fn _mpoly_gen_shift_left(
1268 Aexp: *mut ulong,
1269 Abits: flint_bitcnt_t,
1270 Alength: slong,
1271 var: slong,
1272 amount: ulong,
1273 mctx: *const mpoly_ctx_struct,
1274 );
1275 pub fn mpoly_monomials_shift_right_ui(
1276 Aexps: *mut ulong,
1277 Abits: flint_bitcnt_t,
1278 Alength: slong,
1279 user_exps: *const ulong,
1280 mctx: *const mpoly_ctx_struct,
1281 );
1282 pub fn mpoly_monomials_shift_right_ffmpz(
1283 Aexps: *mut ulong,
1284 Abits: flint_bitcnt_t,
1285 Alength: slong,
1286 user_exps: *const fmpz,
1287 mctx: *const mpoly_ctx_struct,
1288 );
1289 pub fn mpoly1_fill_marks(
1290 Dcoeffs: *mut *mut ulong,
1291 Dlen: *mut slong,
1292 Dalloc: *mut slong,
1293 Aexps: *const ulong,
1294 Alen: slong,
1295 Abits: flint_bitcnt_t,
1296 mctx: *const mpoly_ctx_struct,
1297 );
1298 pub fn mpoly2_fill_marks(
1299 Dcoeffs: *mut *mut ulong,
1300 Dlen: *mut slong,
1301 Dalloc: *mut slong,
1302 Aexps: *const ulong,
1303 Alen: slong,
1304 Abits: flint_bitcnt_t,
1305 mctx: *const mpoly_ctx_struct,
1306 );
1307 pub fn mpoly_to_mpolyl_perm_deflate(
1308 Aexps: *mut ulong,
1309 Abits: flint_bitcnt_t,
1310 Actx: *const mpoly_ctx_struct,
1311 Bexps: *mut ulong,
1312 Bbits: flint_bitcnt_t,
1313 Bctx: *const mpoly_ctx_struct,
1314 length: slong,
1315 perm: *const slong,
1316 shift: *const ulong,
1317 stride: *const ulong,
1318 );
1319 pub fn mpoly_from_mpolyl_perm_inflate(
1320 Bexps: *mut ulong,
1321 Bbits: flint_bitcnt_t,
1322 Bctx: *const mpoly_ctx_struct,
1323 Aexps: *mut ulong,
1324 Abits: flint_bitcnt_t,
1325 Actx: *const mpoly_ctx_struct,
1326 length: slong,
1327 perm: *const slong,
1328 shift: *const ulong,
1329 stride: *const ulong,
1330 );
1331 pub fn mpoly_gcd_info_init(Iv: *mut mpoly_gcd_info_struct, nvars: slong);
1332 pub fn mpoly_gcd_info_clear(Iv: *mut mpoly_gcd_info_struct);
1333 pub fn mpoly_gcd_info_limits(
1334 Amax_exp: *mut ulong,
1335 Amin_exp: *mut ulong,
1336 Amax_exp_count: *mut slong,
1337 Amin_exp_count: *mut slong,
1338 Aexps: *const ulong,
1339 Abits: flint_bitcnt_t,
1340 Alength: slong,
1341 mctx: *const mpoly_ctx_struct,
1342 );
1343 pub fn mpoly_gcd_info_stride(
1344 strides: *mut ulong,
1345 Aexps: *const ulong,
1346 Abits: flint_bitcnt_t,
1347 Alength: slong,
1348 Amax_exp: *const ulong,
1349 Amin_exp: *const ulong,
1350 Bexps: *const ulong,
1351 Bbits: flint_bitcnt_t,
1352 Blength: slong,
1353 Bmax_exp: *const ulong,
1354 Bmin_exp: *const ulong,
1355 mctx: *const mpoly_ctx_struct,
1356 );
1357 pub fn mpoly_gcd_info_set_perm(
1358 Iv: *mut mpoly_gcd_info_struct,
1359 Alength: slong,
1360 Blength: slong,
1361 mctx: *const mpoly_ctx_struct,
1362 );
1363 pub fn mpoly_gcd_info_get_brown_upper_limit(
1364 Iv: *const mpoly_gcd_info_struct,
1365 var: slong,
1366 bound: slong,
1367 ) -> slong;
1368 pub fn mpoly_gcd_info_measure_hensel(
1369 Iv: *mut mpoly_gcd_info_struct,
1370 Alength: slong,
1371 Blength: slong,
1372 UNUSED_mctx: *const mpoly_ctx_struct,
1373 );
1374 pub fn mpoly_gcd_info_measure_brown(
1375 Iv: *mut mpoly_gcd_info_struct,
1376 Alength: slong,
1377 Blength: slong,
1378 UNUSED_mctx: *const mpoly_ctx_struct,
1379 );
1380 pub fn mpoly_gcd_info_measure_bma(
1381 Iv: *mut mpoly_gcd_info_struct,
1382 Alength: slong,
1383 Blength: slong,
1384 UNUSED_mctx: *const mpoly_ctx_struct,
1385 );
1386 pub fn mpoly_gcd_info_measure_zippel(
1387 Iv: *mut mpoly_gcd_info_struct,
1388 UNUSED_Alength: slong,
1389 UNUSED_Blength: slong,
1390 UNUSED_mctx: *const mpoly_ctx_struct,
1391 );
1392 pub fn mpoly_gcd_info_measure_zippel2(
1393 Iv: *mut mpoly_gcd_info_struct,
1394 UNUSED_Alength: slong,
1395 UNUSED_Blength: slong,
1396 UNUSED_mctx: *const mpoly_ctx_struct,
1397 );
1398 pub fn mpoly_monomial_cofactors(
1399 Abarexps: *mut fmpz,
1400 Bbarexps: *mut fmpz,
1401 Aexps: *const ulong,
1402 Abits: flint_bitcnt_t,
1403 Bexps: *const ulong,
1404 Bbits: flint_bitcnt_t,
1405 length: slong,
1406 mctx: *const mpoly_ctx_struct,
1407 ) -> libc::c_int;
1408 pub fn mpoly_is_proved_not_square(
1409 Aexps: *const ulong,
1410 Alen: slong,
1411 Abits: flint_bitcnt_t,
1412 N: slong,
1413 t: *mut ulong,
1414 ) -> libc::c_int;
1415 pub fn mpoly_remove_var_powers(
1416 var_powers: *mut fmpz,
1417 Aexps: *mut ulong,
1418 Abits: flint_bitcnt_t,
1419 Alen: slong,
1420 mctx: *const mpoly_ctx_struct,
1421 );
1422 pub fn _mpoly_compress_exps(
1423 V: *mut slong,
1424 D: *mut slong,
1425 deg: *mut slong,
1426 S: *mut slong,
1427 n: slong,
1428 l: slong,
1429 ) -> slong;
1430 pub fn mpoly_test_irreducible(
1431 Aexps: *mut ulong,
1432 Abits: flint_bitcnt_t,
1433 Alen: slong,
1434 ctx: *const mpoly_ctx_struct,
1435 ) -> libc::c_int;
1436 pub fn _mpoly_test_irreducible(
1437 Aexps: *mut slong,
1438 stride: slong,
1439 Alen: slong,
1440 nvars: slong,
1441 state: *mut flint_rand_struct,
1442 tries_left: slong,
1443 ) -> libc::c_int;
1444 pub fn mpoly_compression_init(M: *mut mpoly_compression_struct);
1445 pub fn mpoly_compression_clear(M: *mut mpoly_compression_struct);
1446 pub fn mpoly_compression_set(
1447 M: *mut mpoly_compression_struct,
1448 Aexps: *const ulong,
1449 Abits: flint_bitcnt_t,
1450 Alen: slong,
1451 mctx: *const mpoly_ctx_struct,
1452 );
1453 pub fn mpoly_bivar_cld_bounds(l: *mut slong, n: slong);
1454 #[link_name = "_slong_array_fit_length__extern"]
1455 pub fn _slong_array_fit_length(array: *mut *mut slong, alloc: *mut slong, len: slong);
1456 pub fn _mpoly_heap_pop1(
1457 heap: *mut mpoly_heap1_s,
1458 heap_len: *mut slong,
1459 maskhi: ulong,
1460 ) -> *mut libc::c_void;
1461 pub fn _mpoly_heap_insert1(
1462 heap: *mut mpoly_heap1_s,
1463 exp: ulong,
1464 x: *mut libc::c_void,
1465 next_loc: *mut slong,
1466 heap_len: *mut slong,
1467 maskhi: ulong,
1468 );
1469 pub fn _mpoly_heap_pop(
1470 heap: *mut mpoly_heap_s,
1471 heap_len: *mut slong,
1472 N: slong,
1473 cmpmask: *const ulong,
1474 ) -> *mut libc::c_void;
1475 pub fn _mpoly_heap_insert(
1476 heap: *mut mpoly_heap_s,
1477 exp: *mut ulong,
1478 x: *mut libc::c_void,
1479 next_loc: *mut slong,
1480 heap_len: *mut slong,
1481 N: slong,
1482 cmpmask: *const ulong,
1483 ) -> libc::c_int;
1484 pub fn mpoly_void_ring_elem_init(R: *mut _bindgen_ty_2) -> *mut libc::c_void;
1485 pub fn mpoly_void_ring_elem_clear(a: *mut libc::c_void, R: *mut _bindgen_ty_2);
1486 pub fn mpoly_univar_init(A: *mut mpoly_univar_struct, R: *mut _bindgen_ty_2);
1487 pub fn mpoly_univar_init2(A: *mut mpoly_univar_struct, len: slong, R: *mut _bindgen_ty_2);
1488 pub fn mpoly_univar_clear(A: *mut mpoly_univar_struct, R: *mut _bindgen_ty_2);
1489 pub fn mpoly_univar_swap(A: *mut mpoly_univar_struct, B: *mut mpoly_univar_struct);
1490 pub fn mpoly_univar_fit_length(A: *mut mpoly_univar_struct, len: slong, R: *mut _bindgen_ty_2);
1491 pub fn mpoly_univar_pseudo_gcd_ducos(
1492 G: *mut mpoly_univar_struct,
1493 B: *mut mpoly_univar_struct,
1494 A: *mut mpoly_univar_struct,
1495 R: *mut _bindgen_ty_2,
1496 ) -> libc::c_int;
1497 pub fn mpoly_univar_resultant(
1498 r: *mut libc::c_void,
1499 fx: *mut mpoly_univar_struct,
1500 gx: *mut mpoly_univar_struct,
1501 R: *mut _bindgen_ty_2,
1502 ) -> libc::c_int;
1503 pub fn mpoly_univar_discriminant(
1504 d: *mut libc::c_void,
1505 fx: *mut mpoly_univar_struct,
1506 R: *mut _bindgen_ty_2,
1507 ) -> libc::c_int;
1508 pub fn mpoly_parse_init(E: *mut mpoly_parse_struct);
1509 pub fn mpoly_parse_clear(E: *mut mpoly_parse_struct);
1510 pub fn mpoly_parse_add_terminal(
1511 E: *mut mpoly_parse_struct,
1512 s: *const libc::c_char,
1513 v: *const libc::c_void,
1514 );
1515 pub fn mpoly_parse_parse(
1516 E: *mut mpoly_parse_struct,
1517 res: *mut libc::c_void,
1518 s: *const libc::c_char,
1519 len: slong,
1520 ) -> libc::c_int;
1521 pub fn mpoly_main_variable_terms1(
1522 i1: *mut slong,
1523 n1: *mut slong,
1524 exp1: *const ulong,
1525 l1: slong,
1526 len1: slong,
1527 k: slong,
1528 UNUSED_num: slong,
1529 bits: slong,
1530 );
1531}