flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
/* automatically generated by rust-bindgen 0.70.1 */

use crate::deps::*;
use crate::acb_types::*;
use crate::arb_types::*;
use crate::arf_types::*;
use crate::flint::*;
use crate::fmpz_types::*;


pub const ACB_THETA_LOW_PREC: u32 = 32;
#[repr(C)]
pub struct acb_theta_eld_struct {
    pub dim: slong,
    pub ambient_dim: slong,
    pub last_coords: *mut slong,
    pub min: slong,
    pub mid: slong,
    pub max: slong,
    pub nr: slong,
    pub nl: slong,
    pub rchildren: *mut acb_theta_eld_struct,
    pub lchildren: *mut acb_theta_eld_struct,
    pub nb_pts: slong,
    pub nb_border: slong,
    pub box_: *mut slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of acb_theta_eld_struct"][::std::mem::size_of::<acb_theta_eld_struct>() - 104usize];
    ["Alignment of acb_theta_eld_struct"][::std::mem::align_of::<acb_theta_eld_struct>() - 8usize];
    ["Offset of field: acb_theta_eld_struct::dim"]
        [::std::mem::offset_of!(acb_theta_eld_struct, dim) - 0usize];
    ["Offset of field: acb_theta_eld_struct::ambient_dim"]
        [::std::mem::offset_of!(acb_theta_eld_struct, ambient_dim) - 8usize];
    ["Offset of field: acb_theta_eld_struct::last_coords"]
        [::std::mem::offset_of!(acb_theta_eld_struct, last_coords) - 16usize];
    ["Offset of field: acb_theta_eld_struct::min"]
        [::std::mem::offset_of!(acb_theta_eld_struct, min) - 24usize];
    ["Offset of field: acb_theta_eld_struct::mid"]
        [::std::mem::offset_of!(acb_theta_eld_struct, mid) - 32usize];
    ["Offset of field: acb_theta_eld_struct::max"]
        [::std::mem::offset_of!(acb_theta_eld_struct, max) - 40usize];
    ["Offset of field: acb_theta_eld_struct::nr"]
        [::std::mem::offset_of!(acb_theta_eld_struct, nr) - 48usize];
    ["Offset of field: acb_theta_eld_struct::nl"]
        [::std::mem::offset_of!(acb_theta_eld_struct, nl) - 56usize];
    ["Offset of field: acb_theta_eld_struct::rchildren"]
        [::std::mem::offset_of!(acb_theta_eld_struct, rchildren) - 64usize];
    ["Offset of field: acb_theta_eld_struct::lchildren"]
        [::std::mem::offset_of!(acb_theta_eld_struct, lchildren) - 72usize];
    ["Offset of field: acb_theta_eld_struct::nb_pts"]
        [::std::mem::offset_of!(acb_theta_eld_struct, nb_pts) - 80usize];
    ["Offset of field: acb_theta_eld_struct::nb_border"]
        [::std::mem::offset_of!(acb_theta_eld_struct, nb_border) - 88usize];
    ["Offset of field: acb_theta_eld_struct::box_"]
        [::std::mem::offset_of!(acb_theta_eld_struct, box_) - 96usize];
};
impl Default for acb_theta_eld_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type acb_theta_eld_t = [acb_theta_eld_struct; 1usize];
#[repr(C)]
pub struct acb_theta_ctx_tau_struct {
    pub g: slong,
    pub allow_shift: libc::c_int,
    pub yinv: arb_mat_struct,
    pub cho: arb_mat_struct,
    pub exp_tau_div_4: acb_mat_t,
    pub exp_tau_div_2: acb_mat_t,
    pub exp_tau: acb_mat_t,
    pub exp_tau_div_4_inv: acb_mat_t,
    pub exp_tau_div_2_inv: acb_mat_t,
    pub exp_tau_inv: acb_mat_t,
    pub exp_tau_a: acb_ptr,
    pub exp_tau_a_inv: acb_ptr,
    pub exp_a_tau_a_div_4: acb_ptr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of acb_theta_ctx_tau_struct"]
        [::std::mem::size_of::<acb_theta_ctx_tau_struct>() - 296usize];
    ["Alignment of acb_theta_ctx_tau_struct"]
        [::std::mem::align_of::<acb_theta_ctx_tau_struct>() - 8usize];
    ["Offset of field: acb_theta_ctx_tau_struct::g"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, g) - 0usize];
    ["Offset of field: acb_theta_ctx_tau_struct::allow_shift"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, allow_shift) - 8usize];
    ["Offset of field: acb_theta_ctx_tau_struct::yinv"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, yinv) - 16usize];
    ["Offset of field: acb_theta_ctx_tau_struct::cho"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, cho) - 48usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_div_4"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_div_4) - 80usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_div_2"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_div_2) - 112usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau) - 144usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_div_4_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_div_4_inv) - 176usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_div_2_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_div_2_inv) - 208usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_inv) - 240usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_a"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_a) - 272usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_tau_a_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_tau_a_inv) - 280usize];
    ["Offset of field: acb_theta_ctx_tau_struct::exp_a_tau_a_div_4"]
        [::std::mem::offset_of!(acb_theta_ctx_tau_struct, exp_a_tau_a_div_4) - 288usize];
};
impl Default for acb_theta_ctx_tau_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type acb_theta_ctx_tau_t = [acb_theta_ctx_tau_struct; 1usize];
#[repr(C)]
pub struct acb_theta_ctx_z_struct {
    pub g: slong,
    pub exp_z: acb_ptr,
    pub exp_2z: acb_ptr,
    pub exp_z_inv: acb_ptr,
    pub exp_2z_inv: acb_ptr,
    pub v: arb_ptr,
    pub u: arb_struct,
    pub uinv: arb_struct,
    pub is_real: libc::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of acb_theta_ctx_z_struct"][::std::mem::size_of::<acb_theta_ctx_z_struct>() - 152usize];
    ["Alignment of acb_theta_ctx_z_struct"]
        [::std::mem::align_of::<acb_theta_ctx_z_struct>() - 8usize];
    ["Offset of field: acb_theta_ctx_z_struct::g"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, g) - 0usize];
    ["Offset of field: acb_theta_ctx_z_struct::exp_z"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, exp_z) - 8usize];
    ["Offset of field: acb_theta_ctx_z_struct::exp_2z"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, exp_2z) - 16usize];
    ["Offset of field: acb_theta_ctx_z_struct::exp_z_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, exp_z_inv) - 24usize];
    ["Offset of field: acb_theta_ctx_z_struct::exp_2z_inv"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, exp_2z_inv) - 32usize];
    ["Offset of field: acb_theta_ctx_z_struct::v"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, v) - 40usize];
    ["Offset of field: acb_theta_ctx_z_struct::u"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, u) - 48usize];
    ["Offset of field: acb_theta_ctx_z_struct::uinv"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, uinv) - 96usize];
    ["Offset of field: acb_theta_ctx_z_struct::is_real"]
        [::std::mem::offset_of!(acb_theta_ctx_z_struct, is_real) - 144usize];
};
impl Default for acb_theta_ctx_z_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type acb_theta_ctx_z_t = [acb_theta_ctx_z_struct; 1usize];
pub type acb_theta_sum_worker_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: acb_ptr,
        arg2: acb_srcptr,
        arg3: acb_srcptr,
        arg4: *const slong,
        arg5: slong,
        arg6: *const acb_struct,
        arg7: *const slong,
        arg8: slong,
        arg9: slong,
        arg10: slong,
        arg11: slong,
    ),
>;
extern "C" {
    #[link_name = "sp2gz_dim__extern"]
    pub fn sp2gz_dim(mat: *const fmpz_mat_struct) -> slong;
    pub fn sp2gz_set_blocks(
        mat: *mut fmpz_mat_struct,
        alpha: *const fmpz_mat_struct,
        beta: *const fmpz_mat_struct,
        gamma: *const fmpz_mat_struct,
        delta: *const fmpz_mat_struct,
    );
    pub fn sp2gz_j(mat: *mut fmpz_mat_struct);
    pub fn sp2gz_block_diag(mat: *mut fmpz_mat_struct, U: *const fmpz_mat_struct);
    pub fn sp2gz_trig(mat: *mut fmpz_mat_struct, S: *const fmpz_mat_struct);
    pub fn sp2gz_embed(res: *mut fmpz_mat_struct, mat: *const fmpz_mat_struct);
    pub fn sp2gz_restrict(res: *mut fmpz_mat_struct, mat: *const fmpz_mat_struct);
    #[link_name = "sp2gz_nb_fundamental__extern"]
    pub fn sp2gz_nb_fundamental(g: slong) -> slong;
    pub fn sp2gz_fundamental(mat: *mut fmpz_mat_struct, j: slong);
    pub fn sp2gz_is_correct(mat: *const fmpz_mat_struct) -> libc::c_int;
    pub fn sp2gz_is_j(mat: *const fmpz_mat_struct) -> libc::c_int;
    pub fn sp2gz_is_block_diag(mat: *const fmpz_mat_struct) -> libc::c_int;
    pub fn sp2gz_is_trig(mat: *const fmpz_mat_struct) -> libc::c_int;
    pub fn sp2gz_is_embedded(res: *mut fmpz_mat_struct, mat: *const fmpz_mat_struct)
        -> libc::c_int;
    pub fn sp2gz_inv(inv: *mut fmpz_mat_struct, mat: *const fmpz_mat_struct);
    pub fn sp2gz_decompose(nb: *mut slong, mat: *const fmpz_mat_struct) -> *mut fmpz_mat_struct;
    pub fn sp2gz_randtest(mat: *mut fmpz_mat_struct, state: *mut flint_rand_struct, bits: slong);
    pub fn acb_siegel_cocycle(
        c: *mut acb_mat_struct,
        mat: *const fmpz_mat_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_siegel_transform_cocycle_inv(
        w: *mut acb_mat_struct,
        c: *mut acb_mat_struct,
        cinv: *mut acb_mat_struct,
        mat: *const fmpz_mat_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_siegel_transform(
        w: *mut acb_mat_struct,
        mat: *const fmpz_mat_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_siegel_cho_yinv(
        cho: *mut arb_mat_struct,
        yinv: *mut arb_mat_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_siegel_reduce(mat: *mut fmpz_mat_struct, tau: *const acb_mat_struct, prec: slong);
    pub fn acb_siegel_is_reduced(
        tau: *const acb_mat_struct,
        tol_exp: slong,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_siegel_kappa(
        sqrtdet: *mut acb_struct,
        mat: *const fmpz_mat_struct,
        tau: *const acb_mat_struct,
        sqr: libc::c_int,
        prec: slong,
    ) -> slong;
    pub fn acb_siegel_kappa2(mat: *const fmpz_mat_struct) -> slong;
    pub fn acb_siegel_randtest(
        tau: *mut acb_mat_struct,
        state: *mut flint_rand_struct,
        prec: slong,
        mag_bits: slong,
    );
    pub fn acb_siegel_randtest_reduced(
        tau: *mut acb_mat_struct,
        state: *mut flint_rand_struct,
        prec: slong,
        mag_bits: slong,
    );
    pub fn acb_siegel_randtest_compact(
        tau: *mut acb_mat_struct,
        state: *mut flint_rand_struct,
        exact: libc::c_int,
        prec: slong,
    );
    pub fn acb_siegel_randtest_vec(
        z: acb_ptr,
        state: *mut flint_rand_struct,
        g: slong,
        prec: slong,
    );
    pub fn acb_siegel_randtest_vec_reduced(
        zs: acb_ptr,
        state: *mut flint_rand_struct,
        nb: slong,
        tau: *const acb_mat_struct,
        exact: libc::c_int,
        prec: slong,
    );
    #[link_name = "acb_theta_char_bit__extern"]
    pub fn acb_theta_char_bit(ch: ulong, j: slong, n: slong) -> libc::c_int;
    pub fn acb_theta_char_get_arb(v: arb_ptr, a: ulong, g: slong);
    pub fn acb_theta_char_get_acb(v: acb_ptr, a: ulong, g: slong);
    pub fn acb_theta_char_set_slong_vec(vec: *const slong, len: slong) -> ulong;
    pub fn acb_theta_char_dot(a: ulong, b: ulong, g: slong) -> slong;
    pub fn acb_theta_char_dot_slong(a: ulong, n: *const slong, g: slong) -> slong;
    #[link_name = "acb_theta_char_is_even__extern"]
    pub fn acb_theta_char_is_even(ab: ulong, g: slong) -> libc::c_int;
    pub fn acb_theta_char_table(
        ch: *mut ulong,
        e: *mut slong,
        mat: *const fmpz_mat_struct,
        ab: ulong,
        all: libc::c_int,
    );
    pub fn acb_theta_char_shuffle(
        res: acb_ptr,
        mat: *const fmpz_mat_struct,
        th: acb_srcptr,
        sqr: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_jet_nb(ord: slong, g: slong) -> slong;
    pub fn acb_theta_jet_total_order(tup: *const slong, g: slong) -> slong;
    pub fn acb_theta_jet_tuples(tups: *mut slong, ord: slong, g: slong);
    pub fn acb_theta_jet_index(tup: *const slong, g: slong) -> slong;
    pub fn acb_theta_jet_mul(
        res: acb_ptr,
        v1: acb_srcptr,
        v2: acb_srcptr,
        ord: slong,
        g: slong,
        prec: slong,
    );
    pub fn acb_theta_jet_compose(
        res: acb_ptr,
        v: acb_srcptr,
        N: *const acb_mat_struct,
        ord: slong,
        prec: slong,
    );
    pub fn acb_theta_jet_exp_pi_i(res: acb_ptr, a: arb_srcptr, ord: slong, g: slong, prec: slong);
    pub fn acb_theta_jet_exp_qf(
        res: acb_ptr,
        z: acb_srcptr,
        N: *const acb_mat_struct,
        ord: slong,
        prec: slong,
    );
    pub fn acb_theta_eld_init(E: *mut acb_theta_eld_struct, d: slong, g: slong);
    pub fn acb_theta_eld_clear(E: *mut acb_theta_eld_struct);
    pub fn acb_theta_eld_set(
        E: *mut acb_theta_eld_struct,
        C: *const arb_mat_struct,
        R2: *const arf_struct,
        v: arb_srcptr,
    ) -> libc::c_int;
    #[link_name = "acb_theta_eld_nb_pts__extern"]
    pub fn acb_theta_eld_nb_pts(E: *const acb_theta_eld_struct) -> slong;
    pub fn acb_theta_eld_points(pts: *mut slong, E: *const acb_theta_eld_struct);
    #[link_name = "acb_theta_eld_box__extern"]
    pub fn acb_theta_eld_box(E: *const acb_theta_eld_struct, j: slong) -> slong;
    #[link_name = "acb_theta_eld_nb_border__extern"]
    pub fn acb_theta_eld_nb_border(E: *const acb_theta_eld_struct) -> slong;
    pub fn acb_theta_eld_border(pts: *mut slong, E: *const acb_theta_eld_struct);
    pub fn acb_theta_eld_contains(E: *const acb_theta_eld_struct, pt: *const slong) -> libc::c_int;
    pub fn acb_theta_eld_print(E: *const acb_theta_eld_struct);
    pub fn acb_theta_eld_distances(
        ds: arb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_theta_sum_radius(
        R2: *mut arf_struct,
        eps: *mut arf_struct,
        cho: *const arb_mat_struct,
        ord: slong,
        prec: slong,
    );
    pub fn acb_theta_sum_jet_radius(
        R2: *mut arf_struct,
        eps: *mut arf_struct,
        cho: *const arb_mat_struct,
        v: arb_srcptr,
        ord: slong,
        prec: slong,
    );
    pub fn acb_theta_sum_term(
        res: *mut acb_struct,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        tup: *const slong,
        n: *const slong,
        prec: slong,
    );
    pub fn acb_theta_sum_addprec(d: *const arb_struct) -> slong;
    pub fn acb_theta_ctx_tau_init(
        ctx: *mut acb_theta_ctx_tau_struct,
        allow_shift: libc::c_int,
        g: slong,
    );
    pub fn acb_theta_ctx_tau_clear(ctx: *mut acb_theta_ctx_tau_struct);
    pub fn acb_theta_ctx_z_init(ctx: *mut acb_theta_ctx_z_struct, g: slong);
    pub fn acb_theta_ctx_z_clear(ctx: *mut acb_theta_ctx_z_struct);
    pub fn acb_theta_ctx_z_vec_init(nb: slong, g: slong) -> *mut acb_theta_ctx_z_struct;
    pub fn acb_theta_ctx_z_vec_clear(vec: *mut acb_theta_ctx_z_struct, nb: slong);
    pub fn acb_theta_ctx_exp_inv(
        exp_inv: *mut acb_struct,
        exp: *const acb_struct,
        x: *const acb_struct,
        is_real: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_ctx_sqr_inv(
        sqr_inv: *mut acb_struct,
        inv: *const acb_struct,
        sqr: *const acb_struct,
        is_real: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_ctx_tau_set(
        ctx: *mut acb_theta_ctx_tau_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_theta_ctx_tau_dupl(ctx: *mut acb_theta_ctx_tau_struct, prec: slong);
    pub fn acb_theta_ctx_tau_overlaps(
        ctx1: *const acb_theta_ctx_tau_struct,
        ctx2: *const acb_theta_ctx_tau_struct,
    ) -> libc::c_int;
    pub fn acb_theta_ctx_z_set(
        ctx: *mut acb_theta_ctx_z_struct,
        z: acb_srcptr,
        ctx_tau: *const acb_theta_ctx_tau_struct,
        prec: slong,
    );
    pub fn acb_theta_ctx_z_dupl(ctx: *mut acb_theta_ctx_z_struct, prec: slong);
    pub fn acb_theta_ctx_z_add_real(
        res: *mut acb_theta_ctx_z_struct,
        ctx: *const acb_theta_ctx_z_struct,
        ctx_real: *const acb_theta_ctx_z_struct,
        prec: slong,
    );
    pub fn acb_theta_ctx_z_common_v(
        v: arb_ptr,
        vec: *const acb_theta_ctx_z_struct,
        nb: slong,
        prec: slong,
    );
    pub fn acb_theta_ctx_z_overlaps(
        ctx1: *const acb_theta_ctx_z_struct,
        ctx2: *const acb_theta_ctx_z_struct,
    ) -> libc::c_int;
    pub fn acb_theta_sum_sqr_pow(
        sqr_pow: *mut acb_ptr,
        exp_tau: *const acb_mat_struct,
        E: *const acb_theta_eld_struct,
        prec: slong,
    );
    pub fn acb_theta_sum_work(
        th: acb_ptr,
        len: slong,
        exp_z: acb_srcptr,
        exp_z_inv: acb_srcptr,
        exp_tau: *const acb_mat_struct,
        exp_tau_inv: *const acb_mat_struct,
        sqr_pow: *const acb_ptr,
        E: *const acb_theta_eld_struct,
        ord: slong,
        prec: slong,
        worker: acb_theta_sum_worker_t,
    );
    pub fn acb_theta_sum(
        th: acb_ptr,
        vec: *const acb_theta_ctx_z_struct,
        nb: slong,
        ctx_tau: *const acb_theta_ctx_tau_struct,
        distances: arb_srcptr,
        all_a: libc::c_int,
        all_b: libc::c_int,
        tilde: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_sum_jet(
        th: acb_ptr,
        vec: *const acb_theta_ctx_z_struct,
        nb: slong,
        ctx_tau: *const acb_theta_ctx_tau_struct,
        ord: slong,
        all_a: libc::c_int,
        all_b: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_agm_sqrt(
        res: acb_ptr,
        a: acb_srcptr,
        roots: acb_srcptr,
        nb: slong,
        prec: slong,
    );
    pub fn acb_theta_agm_mul(
        res: acb_ptr,
        a1: acb_srcptr,
        a2: acb_srcptr,
        g: slong,
        all: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_agm_mul_tight(
        res: acb_ptr,
        a0: acb_srcptr,
        a: acb_srcptr,
        d0: arb_srcptr,
        d: arb_srcptr,
        g: slong,
        all: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_ql_nb_steps(
        pattern: *mut slong,
        tau: *const acb_mat_struct,
        cst: libc::c_int,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_theta_ql_lower_dim(
        new_zs: *mut acb_ptr,
        cofactors: *mut acb_ptr,
        pts: *mut *mut slong,
        nb: *mut slong,
        err: *mut arf_struct,
        fullprec: *mut slong,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        distances: arb_srcptr,
        s: slong,
        a: ulong,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_theta_ql_recombine(
        th: acb_ptr,
        th0: acb_srcptr,
        cofactors: acb_srcptr,
        pts: *const slong,
        nb: slong,
        err: *const arf_struct,
        fullprec: slong,
        s: slong,
        a: ulong,
        all: libc::c_int,
        g: slong,
        prec: slong,
    );
    pub fn acb_theta_ql_setup(
        rts: acb_ptr,
        rts_all: acb_ptr,
        t: acb_ptr,
        guard: *mut slong,
        easy_steps: *mut slong,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        distances: arb_srcptr,
        nb_steps: slong,
        all: libc::c_int,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_theta_ql_exact(
        th: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        pattern: *const slong,
        all: libc::c_int,
        shifted_prec: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_ql_local_bound(
        c: *mut arb_struct,
        rho: *mut arb_struct,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        ord: slong,
    );
    pub fn acb_theta_ql_jet_error(
        err: arb_ptr,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        dth: acb_srcptr,
        ord: slong,
        prec: slong,
    );
    pub fn acb_theta_ql_jet_fd(
        th: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        ord: slong,
        all: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_ql_jet(
        th: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        ord: slong,
        all: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_jet_notransform(
        th: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        ord: slong,
        ab: ulong,
        all: libc::c_int,
        sqr: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_reduce_tau(
        new_zs: acb_ptr,
        new_tau: *mut acb_mat_struct,
        mat: *mut fmpz_mat_struct,
        N: *mut acb_mat_struct,
        ct: *mut acb_mat_struct,
        exps: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_theta_reduce_z(
        new_zs: acb_ptr,
        rs: arb_ptr,
        cs: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        prec: slong,
    ) -> libc::c_int;
    pub fn acb_theta_jet(
        th: acb_ptr,
        zs: acb_srcptr,
        nb: slong,
        tau: *const acb_mat_struct,
        ord: slong,
        ab: ulong,
        all: libc::c_int,
        sqr: libc::c_int,
        prec: slong,
    );
    #[link_name = "acb_theta_one__extern"]
    pub fn acb_theta_one(
        th: acb_ptr,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        ab: ulong,
        prec: slong,
    );
    #[link_name = "acb_theta_all__extern"]
    pub fn acb_theta_all(
        th: acb_ptr,
        z: acb_srcptr,
        tau: *const acb_mat_struct,
        sqr: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_g2_detk_symj(
        res: *mut acb_poly_struct,
        m: *const acb_mat_struct,
        f: *const acb_poly_struct,
        k: slong,
        j: slong,
        prec: slong,
    );
    pub fn acb_theta_g2_transvectant(
        res: *mut acb_poly_struct,
        g: *const acb_poly_struct,
        h: *const acb_poly_struct,
        m: slong,
        n: slong,
        k: slong,
        lead: libc::c_int,
        prec: slong,
    );
    pub fn acb_theta_g2_character(mat: *const fmpz_mat_struct) -> slong;
    pub fn acb_theta_g2_even_weight(
        psi4: *mut acb_struct,
        psi6: *mut acb_struct,
        chi10: *mut acb_struct,
        chi12: *mut acb_struct,
        th2: acb_srcptr,
        prec: slong,
    );
    pub fn acb_theta_g2_chi5(res: *mut acb_struct, th: acb_srcptr, prec: slong);
    pub fn acb_theta_g2_chi35(res: *mut acb_struct, th: acb_srcptr, prec: slong);
    pub fn acb_theta_g2_chi3_6(res: *mut acb_poly_struct, dth: acb_srcptr, prec: slong);
    pub fn acb_theta_g2_sextic_chi5(
        f: *mut acb_poly_struct,
        chi5: *mut acb_struct,
        tau: *const acb_mat_struct,
        prec: slong,
    );
    pub fn acb_theta_g2_covariants(
        res: *mut acb_poly_struct,
        f: *const acb_poly_struct,
        lead: libc::c_int,
        prec: slong,
    );
}