Skip to main content

flint_sys/
padic.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use libc::*;
4use crate::deps::*;
5use crate::flint::*;
6use crate::padic_types::*;
7
8
9extern "C" {
10    #[link_name = "padic_unit__extern"]
11    pub fn padic_unit(x: *const padic_struct) -> *mut fmpz;
12    #[link_name = "padic_get_val__extern"]
13    pub fn padic_get_val(x: *const padic_struct) -> slong;
14    #[link_name = "padic_get_prec__extern"]
15    pub fn padic_get_prec(x: *const padic_struct) -> slong;
16    pub fn padic_ctx_init(
17        ctx: *mut padic_ctx_struct,
18        p: *const fmpz,
19        min: slong,
20        max: slong,
21        mode: padic_print_mode,
22    );
23    pub fn padic_ctx_clear(ctx: *mut padic_ctx_struct);
24    #[link_name = "_padic_ctx_pow_ui__extern"]
25    pub fn _padic_ctx_pow_ui(rop: *mut fmpz, e: ulong, ctx: *const padic_ctx_struct)
26        -> libc::c_int;
27    #[link_name = "padic_ctx_pow_ui__extern"]
28    pub fn padic_ctx_pow_ui(rop: *mut fmpz, e: ulong, ctx: *const padic_ctx_struct);
29    pub fn padic_init(rop: *mut padic_struct);
30    pub fn padic_init2(rop: *mut padic_struct, N: slong);
31    pub fn padic_clear(rop: *mut padic_struct);
32    #[link_name = "_padic_canonicalise__extern"]
33    pub fn _padic_canonicalise(rop: *mut padic_struct, ctx: *const padic_ctx_struct);
34    pub fn _padic_reduce(rop: *mut padic_struct, ctx: *const padic_ctx_struct);
35    pub fn padic_reduce(rop: *mut padic_struct, ctx: *const padic_ctx_struct);
36    pub fn padic_randtest(
37        rop: *mut padic_struct,
38        state: *mut flint_rand_struct,
39        ctx: *const padic_ctx_struct,
40    );
41    pub fn padic_randtest_not_zero(
42        rop: *mut padic_struct,
43        state: *mut flint_rand_struct,
44        ctx: *const padic_ctx_struct,
45    );
46    pub fn padic_randtest_int(
47        rop: *mut padic_struct,
48        state: *mut flint_rand_struct,
49        ctx: *const padic_ctx_struct,
50    );
51    pub fn padic_set_si(rop: *mut padic_struct, op: slong, ctx: *const padic_ctx_struct);
52    pub fn padic_set_ui(rop: *mut padic_struct, op: ulong, ctx: *const padic_ctx_struct);
53    pub fn padic_set_fmpz(rop: *mut padic_struct, op: *const fmpz, ctx: *const padic_ctx_struct);
54    pub fn padic_set_fmpq(rop: *mut padic_struct, op: *const fmpq, ctx: *const padic_ctx_struct);
55    pub fn padic_set_mpz(
56        rop: *mut padic_struct,
57        op: *const __mpz_struct,
58        ctx: *const padic_ctx_struct,
59    );
60    pub fn padic_set_mpq(
61        rop: *mut padic_struct,
62        op: *const __mpq_struct,
63        ctx: *const padic_ctx_struct,
64    );
65    pub fn padic_set(rop: *mut padic_struct, op: *const padic_struct, ctx: *const padic_ctx_struct);
66    pub fn padic_get_fmpz(rop: *mut fmpz, op: *const padic_struct, ctx: *const padic_ctx_struct);
67    pub fn padic_get_fmpq(rop: *mut fmpq, op: *const padic_struct, ctx: *const padic_ctx_struct);
68    pub fn padic_get_mpz(
69        rop: *mut __mpz_struct,
70        op: *const padic_struct,
71        ctx: *const padic_ctx_struct,
72    );
73    pub fn padic_get_mpq(
74        rop: *mut __mpq_struct,
75        op: *const padic_struct,
76        ctx: *const padic_ctx_struct,
77    );
78    #[link_name = "padic_swap__extern"]
79    pub fn padic_swap(op1: *mut padic_struct, op2: *mut padic_struct);
80    #[link_name = "padic_zero__extern"]
81    pub fn padic_zero(rop: *mut padic_struct);
82    #[link_name = "padic_one__extern"]
83    pub fn padic_one(rop: *mut padic_struct);
84    #[link_name = "padic_is_zero__extern"]
85    pub fn padic_is_zero(op: *const padic_struct) -> libc::c_int;
86    #[link_name = "padic_is_one__extern"]
87    pub fn padic_is_one(op: *const padic_struct) -> libc::c_int;
88    #[link_name = "padic_equal__extern"]
89    pub fn padic_equal(op1: *const padic_struct, op2: *const padic_struct) -> libc::c_int;
90    pub fn _padic_lifts_exps(n: *mut slong, N: slong) -> *mut slong;
91    pub fn _padic_lifts_pows(pow: *mut fmpz, a: *const slong, n: slong, p: *const fmpz);
92    pub fn padic_add(
93        rop: *mut padic_struct,
94        op1: *const padic_struct,
95        op2: *const padic_struct,
96        ctx: *const padic_ctx_struct,
97    );
98    pub fn padic_sub(
99        rop: *mut padic_struct,
100        op1: *const padic_struct,
101        op2: *const padic_struct,
102        ctx: *const padic_ctx_struct,
103    );
104    pub fn padic_neg(rop: *mut padic_struct, op: *const padic_struct, ctx: *const padic_ctx_struct);
105    pub fn padic_mul(
106        rop: *mut padic_struct,
107        op1: *const padic_struct,
108        op2: *const padic_struct,
109        ctx: *const padic_ctx_struct,
110    );
111    pub fn padic_shift(
112        rop: *mut padic_struct,
113        op: *const padic_struct,
114        v: slong,
115        ctx: *const padic_ctx_struct,
116    );
117    pub fn padic_div(
118        rop: *mut padic_struct,
119        op1: *const padic_struct,
120        op2: *const padic_struct,
121        ctx: *const padic_ctx_struct,
122    );
123    pub fn _padic_inv_precompute(S: *mut padic_inv_struct, p: *const fmpz, N: slong);
124    pub fn _padic_inv_clear(S: *mut padic_inv_struct);
125    pub fn _padic_inv_precomp(rop: *mut fmpz, op: *const fmpz, S: *const padic_inv_struct);
126    pub fn _padic_inv(rop: *mut fmpz, op: *const fmpz, p: *const fmpz, N: slong);
127    pub fn padic_inv(rop: *mut padic_struct, op: *const padic_struct, ctx: *const padic_ctx_struct);
128    pub fn _padic_sqrt(rop: *mut fmpz, op: *const fmpz, p: *const fmpz, N: slong) -> libc::c_int;
129    pub fn padic_sqrt(
130        rop: *mut padic_struct,
131        op: *const padic_struct,
132        ctx: *const padic_ctx_struct,
133    ) -> libc::c_int;
134    pub fn padic_pow_si(
135        rop: *mut padic_struct,
136        op: *const padic_struct,
137        e: slong,
138        ctx: *const padic_ctx_struct,
139    );
140    pub fn _padic_exp_bound(v: slong, N: slong, p: *const fmpz) -> slong;
141    pub fn _padic_exp(rop: *mut fmpz, u: *const fmpz, v: slong, p: *const fmpz, N: slong);
142    pub fn _padic_exp_rectangular(
143        rop: *mut fmpz,
144        u: *const fmpz,
145        v: slong,
146        p: *const fmpz,
147        N: slong,
148    );
149    pub fn _padic_exp_balanced(rop: *mut fmpz, u: *const fmpz, v: slong, p: *const fmpz, N: slong);
150    pub fn padic_exp(
151        rop: *mut padic_struct,
152        op: *const padic_struct,
153        ctx: *const padic_ctx_struct,
154    ) -> libc::c_int;
155    pub fn padic_exp_rectangular(
156        rop: *mut padic_struct,
157        op: *const padic_struct,
158        ctx: *const padic_ctx_struct,
159    ) -> libc::c_int;
160    pub fn padic_exp_balanced(
161        rop: *mut padic_struct,
162        op: *const padic_struct,
163        ctx: *const padic_ctx_struct,
164    ) -> libc::c_int;
165    pub fn _padic_log_bound(v: slong, N: slong, p: *const fmpz) -> slong;
166    pub fn _padic_log(z: *mut fmpz, y: *const fmpz, v: slong, p: *const fmpz, N: slong);
167    pub fn _padic_log_rectangular(z: *mut fmpz, y: *const fmpz, v: slong, p: *const fmpz, N: slong);
168    pub fn _padic_log_satoh(z: *mut fmpz, y: *const fmpz, v: slong, p: *const fmpz, N: slong);
169    pub fn _padic_log_balanced(
170        z: *mut fmpz,
171        y: *const fmpz,
172        UNUSED_v: slong,
173        p: *const fmpz,
174        N: slong,
175    );
176    pub fn padic_log(
177        rop: *mut padic_struct,
178        op: *const padic_struct,
179        ctx: *const padic_ctx_struct,
180    ) -> libc::c_int;
181    pub fn padic_log_rectangular(
182        rop: *mut padic_struct,
183        op: *const padic_struct,
184        ctx: *const padic_ctx_struct,
185    ) -> libc::c_int;
186    pub fn padic_log_satoh(
187        rop: *mut padic_struct,
188        op: *const padic_struct,
189        ctx: *const padic_ctx_struct,
190    ) -> libc::c_int;
191    pub fn padic_log_balanced(
192        rop: *mut padic_struct,
193        op: *const padic_struct,
194        ctx: *const padic_ctx_struct,
195    ) -> libc::c_int;
196    pub fn _padic_teichmuller(rop: *mut fmpz, op: *const fmpz, p: *const fmpz, N: slong);
197    pub fn padic_teichmuller(
198        rop: *mut padic_struct,
199        op: *const padic_struct,
200        ctx: *const padic_ctx_struct,
201    );
202    pub fn padic_val_fac_ui_2(N: ulong) -> ulong;
203    pub fn padic_val_fac_ui(N: ulong, p: *const fmpz) -> ulong;
204    pub fn padic_val_fac(rop: *mut fmpz, op: *const fmpz, p: *const fmpz);
205    pub fn _padic_get_str(
206        str_: *mut libc::c_char,
207        op: *const padic_struct,
208        p: *const fmpz,
209        mode: padic_print_mode,
210    ) -> *mut libc::c_char;
211    pub fn padic_get_str(
212        str_: *mut libc::c_char,
213        op: *const padic_struct,
214        ctx: *const padic_ctx_struct,
215    ) -> *mut libc::c_char;
216    pub fn _padic_fprint(
217        file: *mut FILE,
218        u: *const fmpz,
219        v: slong,
220        ctx: *const padic_ctx_struct,
221    ) -> libc::c_int;
222    pub fn padic_fprint(
223        file: *mut FILE,
224        op: *const padic_struct,
225        ctx: *const padic_ctx_struct,
226    ) -> libc::c_int;
227    pub fn _padic_print(u: *const fmpz, v: slong, ctx: *const padic_ctx_struct) -> libc::c_int;
228    pub fn padic_print(op: *const padic_struct, ctx: *const padic_ctx_struct) -> libc::c_int;
229    pub fn padic_debug(op: *const padic_struct);
230}