1use crate::deps::*;
4use crate::arb_types::*;
5use crate::fmpz_types::*;
6
7
8#[repr(C)]
9pub struct hypgeom_struct {
10 pub A: fmpz_poly_t,
11 pub B: fmpz_poly_t,
12 pub P: fmpz_poly_t,
13 pub Q: fmpz_poly_t,
14 pub have_precomputed: libc::c_int,
15 pub r: slong,
16 pub boundC: slong,
17 pub boundD: slong,
18 pub boundK: slong,
19 pub MK: mag_t,
20}
21#[allow(clippy::unnecessary_operation, clippy::identity_op)]
22const _: () = {
23 ["Size of hypgeom_struct"][::std::mem::size_of::<hypgeom_struct>() - 152usize];
24 ["Alignment of hypgeom_struct"][::std::mem::align_of::<hypgeom_struct>() - 8usize];
25 ["Offset of field: hypgeom_struct::A"][::std::mem::offset_of!(hypgeom_struct, A) - 0usize];
26 ["Offset of field: hypgeom_struct::B"][::std::mem::offset_of!(hypgeom_struct, B) - 24usize];
27 ["Offset of field: hypgeom_struct::P"][::std::mem::offset_of!(hypgeom_struct, P) - 48usize];
28 ["Offset of field: hypgeom_struct::Q"][::std::mem::offset_of!(hypgeom_struct, Q) - 72usize];
29 ["Offset of field: hypgeom_struct::have_precomputed"]
30 [::std::mem::offset_of!(hypgeom_struct, have_precomputed) - 96usize];
31 ["Offset of field: hypgeom_struct::r"][::std::mem::offset_of!(hypgeom_struct, r) - 104usize];
32 ["Offset of field: hypgeom_struct::boundC"]
33 [::std::mem::offset_of!(hypgeom_struct, boundC) - 112usize];
34 ["Offset of field: hypgeom_struct::boundD"]
35 [::std::mem::offset_of!(hypgeom_struct, boundD) - 120usize];
36 ["Offset of field: hypgeom_struct::boundK"]
37 [::std::mem::offset_of!(hypgeom_struct, boundK) - 128usize];
38 ["Offset of field: hypgeom_struct::MK"][::std::mem::offset_of!(hypgeom_struct, MK) - 136usize];
39};
40impl Default for hypgeom_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 hypgeom_t = [hypgeom_struct; 1usize];
50extern "C" {
51 pub fn hypgeom_init(hyp: *mut hypgeom_struct);
52 pub fn hypgeom_clear(hyp: *mut hypgeom_struct);
53 pub fn hypgeom_precompute(hyp: *mut hypgeom_struct);
54 pub fn hypgeom_estimate_terms(z: *const mag_struct, r: libc::c_int, prec: slong) -> slong;
55 pub fn hypgeom_bound(
56 error: *mut mag_struct,
57 r: libc::c_int,
58 C: slong,
59 D: slong,
60 K: slong,
61 TK: *const mag_struct,
62 z: *const mag_struct,
63 prec: slong,
64 ) -> slong;
65 pub fn arb_hypgeom_sum(
66 P: *mut arb_struct,
67 Q: *mut arb_struct,
68 hyp: *const hypgeom_struct,
69 n: slong,
70 prec: slong,
71 );
72 pub fn arb_hypgeom_infsum(
73 P: *mut arb_struct,
74 Q: *mut arb_struct,
75 hyp: *mut hypgeom_struct,
76 target_prec: slong,
77 prec: slong,
78 );
79}