From b072605bec2a55f38bd85d617d8a2a00aa2da213 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 7 Apr 2024 23:13:37 +0100 Subject: [PATCH 001/104] build: add a meson build configuration --- meson.build | 40 + src/meson.build | 5368 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 5408 insertions(+) create mode 100644 meson.build create mode 100644 src/meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000000..ae7cd95a15 --- /dev/null +++ b/meson.build @@ -0,0 +1,40 @@ +project('FLINT', 'c', + version: '3.1.0', + license: 'LGPL3+' +) + +cc = meson.get_compiler('c') +m_dep = cc.find_library('m', required: false) + +gmp_dep = dependency('gmp', version: '>= 6.2.1') +mpfr_dep = dependency('mpfr', version: '>= 4.1.0') + +flint_deps = [gmp_dep, mpfr_dep, m_dep] + +subdir('src') + +headers_all = [] +foreach header : headers + headers_all += ['src' / header] +endforeach + +c_files_all = [] +foreach file : c_files_all_subdir + c_files_all += ['src' / file] +endforeach + +install_headers(headers_all, subdir: 'flint') + +libflint = library('flint', c_files_all, + dependencies: flint_deps, + include_directories: include_directories('src'), +) + +pkg_mod = import('pkgconfig') +pkg_mod.generate( + libraries: libflint, + version : '3.1.0', + name: 'flint', + filebase: 'flint', + description: 'Fast Library for Number Theory' +) diff --git a/src/meson.build b/src/meson.build new file mode 100644 index 0000000000..5349ceac93 --- /dev/null +++ b/src/meson.build @@ -0,0 +1,5368 @@ +headers = [ + 'acb_calc.h', + 'acb_dft.h', + 'acb_dirichlet.h', + 'acb_elliptic.h', + 'acb.h', + 'acb_hypgeom.h', + 'acb_mat.h', + 'acb_modular.h', + 'acb_poly.h', + 'acb_theta.h', + 'acb_types.h', + 'acf.h', + 'acf_types.h', + 'aprcl.h', + 'arb_calc.h', + 'arb_fmpz_poly.h', + 'arb_fpwrap.h', + 'arb.h', + 'arb_hypgeom.h', + 'arb_mat.h', + 'arb_poly.h', + 'arb_types.h', + 'arf.h', + 'arf_types.h', + 'arith.h', + 'bernoulli.h', + 'bool_mat.h', + 'ca_ext.h', + 'ca_field.h', + 'ca.h', + 'calcium.h', + 'ca_mat.h', + 'ca_poly.h', + 'ca_vec.h', + 'crt_helpers.h', + 'dirichlet.h', + 'dlog.h', + 'd_mat.h', + 'double_extras.h', + 'double_interval.h', + 'd_vec.h', + 'fexpr_builtin.h', + 'fexpr.h', + 'fft.h', + 'fft_small.h', + 'fmpq.h', + 'fmpq_mat.h', + 'fmpq_mpoly_factor.h', + 'fmpq_mpoly.h', + 'fmpq_poly.h', + 'fmpq_types.h', + 'fmpq_vec.h', + 'fmpz_extras.h', + 'fmpz_factor.h', + 'fmpz.h', + 'fmpzi.h', + 'fmpz_lll.h', + 'fmpz_mat.h', + 'fmpz_mod.h', + 'fmpz_mod_mat.h', + 'fmpz_mod_mpoly_factor.h', + 'fmpz_mod_mpoly.h', + 'fmpz_mod_poly_factor.h', + 'fmpz_mod_poly.h', + 'fmpz_mod_types.h', + 'fmpz_mod_vec.h', + 'fmpz_mpoly_factor.h', + 'fmpz_mpoly.h', + 'fmpz_mpoly_q.h', + 'fmpz_poly_factor.h', + 'fmpz_poly.h', + 'fmpz_poly_mat.h', + 'fmpz_poly_q.h', + 'fmpz_types.h', + 'fmpz_vec.h', + 'fq_default.h', + 'fq_default_mat.h', + 'fq_default_poly_factor.h', + 'fq_default_poly.h', + 'fq_embed.h', + 'fq_embed_templates.h', + 'fq.h', + 'fq_mat.h', + 'fq_mat_templates.h', + 'fq_nmod_embed.h', + 'fq_nmod.h', + 'fq_nmod_mat.h', + 'fq_nmod_mpoly_factor.h', + 'fq_nmod_mpoly.h', + 'fq_nmod_poly_factor.h', + 'fq_nmod_poly.h', + 'fq_nmod_types.h', + 'fq_nmod_vec.h', + 'fq_poly_factor.h', + 'fq_poly_factor_templates.h', + 'fq_poly.h', + 'fq_poly_templates.h', + 'fq_templates.h', + 'fq_types.h', + 'fq_vec.h', + 'fq_vec_templates.h', + 'fq_zech_embed.h', + 'fq_zech.h', + 'fq_zech_mat.h', + 'fq_zech_mpoly_factor.h', + 'fq_zech_mpoly.h', + 'fq_zech_poly_factor.h', + 'fq_zech_poly.h', + 'fq_zech_types.h', + 'fq_zech_vec.h', + 'gettimeofday.h', + 'gr_generic.h', + 'gr.h', + 'gr_mat.h', + 'gr_mpoly.h', + 'gr_poly.h', + 'gr_special.h', + 'gr_vec.h', + 'hypgeom.h', + 'limb_types.h', + 'long_extras.h', + 'longlong_asm_clang.h', + 'longlong_asm_gcc.h', + 'longlong_asm_gnu.h', + 'longlong_div_gnu.h', + 'longlong.h', + 'longlong_msc_arm64.h', + 'longlong_msc_x86.h', + 'machine_vectors.h', + 'mag.h', + 'mpf-impl.h', + 'mpfr_mat.h', + 'mpfr_vec.h', + 'mpn_extras.h', + 'mpoly.h', + 'mpoly_types.h', + 'nf_elem.h', + 'nf.h', + 'nmod.h', + 'nmod_mat.h', + 'nmod_mpoly_factor.h', + 'nmod_mpoly.h', + 'nmod_poly_factor.h', + 'nmod_poly.h', + 'nmod_poly_mat.h', + 'nmod_types.h', + 'nmod_vec.h', + 'n_poly.h', + 'n_poly_types.h', + 'NTL-interface.h', + 'padic.h', + 'padic_mat.h', + 'padic_poly.h', + 'padic_types.h', + 'partitions.h', + 'perm.h', + 'profiler.h', + 'qadic.h', + 'qfb.h', + 'qqbar.h', + 'qsieve.h', + 'templates.h', + 'test_helpers.h', + 'thread_pool.h', + 'thread_support.h', + 'ulong_extras.h', +] + +c_files_all_subdir = [ + # These three not captured by src/*/*.c + #'fmpz/link/fmpz_gc.c', + #'fmpz/link/fmpz_reentrant.c', + 'fmpz/link/fmpz_single.c', + # src/*/*.c + 'acb/acos.c', + 'acb/acosh.c', + 'acb/addmul.c', + 'acb/agm1.c', + 'acb/agm.c', + 'acb/approx_dot.c', + 'acb/arg.c', + 'acb/asin.c', + 'acb/asinh.c', + 'acb/atan.c', + 'acb/atanh.c', + 'acb/barnes_g.c', + 'acb/bernoulli_poly_ui.c', + 'acb_calc/cauchy_bound.c', + 'acb_calc/integrate.c', + 'acb_calc/integrate_gl_auto_deg.c', + 'acb_calc/integrate_opt_init.c', + 'acb_calc/integrate_taylor.c', + 'acb/chebyshev_t2_ui.c', + 'acb/chebyshev_t_ui.c', + 'acb/chebyshev_u2_ui.c', + 'acb/chebyshev_u_ui.c', + 'acb/clear.c', + 'acb/contains_int.c', + 'acb/cos.c', + 'acb/cos_pi.c', + 'acb/cot.c', + 'acb/cot_pi.c', + 'acb/csch.c', + 'acb/csc_pi.c', + 'acb/csgn.c', + 'acb/cube.c', + 'acb_dft/bluestein.c', + 'acb_dft/convol.c', + 'acb_dft/convol_dft.c', + 'acb_dft/convol_mullow.c', + 'acb_dft/convol_naive.c', + 'acb_dft/convol_rad2.c', + 'acb_dft/crt.c', + 'acb_dft/cyc.c', + 'acb_dft/naive.c', + 'acb_dft/precomp.c', + 'acb_dft/prod.c', + 'acb_dft/rad2.c', + 'acb_dft/rad2_threaded.c', + 'acb_dft/step.c', + 'acb/digamma.c', + 'acb_dirichlet/arb_quadratic_powers.c', + 'acb_dirichlet/backlund_s_bound.c', + 'acb_dirichlet/backlund_s.c', + 'acb_dirichlet/backlund_s_gram.c', + 'acb_dirichlet/chi.c', + 'acb_dirichlet/chi_vec.c', + 'acb_dirichlet/dft.c', + 'acb_dirichlet/eta.c', + 'acb_dirichlet/euler_product_real_ui.c', + 'acb_dirichlet/gauss_sum.c', + 'acb_dirichlet/gauss_sum_factor.c', + 'acb_dirichlet/gauss_sum_naive.c', + 'acb_dirichlet/gauss_sum_order2.c', + 'acb_dirichlet/gauss_sum_theta.c', + 'acb_dirichlet/gram_point.c', + 'acb_dirichlet/hardy_theta.c', + 'acb_dirichlet/hardy_theta_series.c', + 'acb_dirichlet/hardy_z.c', + 'acb_dirichlet/hardy_z_series.c', + 'acb_dirichlet/hardy_z_zero.c', + 'acb_dirichlet/hurwitz.c', + 'acb_dirichlet/hurwitz_precomp_bound.c', + 'acb_dirichlet/hurwitz_precomp_choose_param.c', + 'acb_dirichlet/hurwitz_precomp_clear.c', + 'acb_dirichlet/hurwitz_precomp_eval.c', + 'acb_dirichlet/hurwitz_precomp_init.c', + 'acb_dirichlet/isolate_hardy_z_zero.c', + 'acb_dirichlet/jacobi_sum.c', + 'acb_dirichlet/jacobi_sum_factor.c', + 'acb_dirichlet/jacobi_sum_gauss.c', + 'acb_dirichlet/jacobi_sum_naive.c', + 'acb_dirichlet/l.c', + 'acb_dirichlet/lerch_phi.c', + 'acb_dirichlet/lerch_phi_direct.c', + 'acb_dirichlet/lerch_phi_integral.c', + 'acb_dirichlet/l_euler_product.c', + 'acb_dirichlet/l_fmpq_afe.c', + 'acb_dirichlet/l_fmpq.c', + 'acb_dirichlet/l_hurwitz.c', + 'acb_dirichlet/l_jet.c', + 'acb_dirichlet/l_series.c', + 'acb_dirichlet/l_vec_hurwitz.c', + 'acb_dirichlet/pairing.c', + 'acb_dirichlet/pairing_conrey.c', + 'acb_dirichlet/platt_beta.c', + 'acb_dirichlet/platt_c_bound.c', + 'acb_dirichlet/platt_hardy_z_zeros.c', + 'acb_dirichlet/platt_i_bound.c', + 'acb_dirichlet/platt_lemma_32.c', + 'acb_dirichlet/platt_lemma_A11.c', + 'acb_dirichlet/platt_lemma_A5.c', + 'acb_dirichlet/platt_lemma_A7.c', + 'acb_dirichlet/platt_lemma_A9.c', + 'acb_dirichlet/platt_lemma_B1.c', + 'acb_dirichlet/platt_lemma_B2.c', + 'acb_dirichlet/platt_local_hardy_z_zeros.c', + 'acb_dirichlet/platt_multieval.c', + 'acb_dirichlet/platt_multieval_threaded.c', + 'acb_dirichlet/platt_ws_interpolation.c', + 'acb_dirichlet/platt_zeta_zeros.c', + 'acb_dirichlet/powsum_sieved.c', + 'acb_dirichlet/powsum_smooth.c', + 'acb_dirichlet/powsum_term.c', + 'acb_dirichlet/qseries_arb.c', + 'acb_dirichlet/qseries_arb_powers.c', + 'acb_dirichlet/root.c', + 'acb_dirichlet/root_number.c', + 'acb_dirichlet/roots_clear.c', + 'acb_dirichlet/roots_init.c', + 'acb_dirichlet/si_poly_evaluate.c', + 'acb_dirichlet/stieltjes.c', + 'acb_dirichlet/theta_arb.c', + 'acb_dirichlet/theta_length.c', + 'acb_dirichlet/turing_method_bound.c', + 'acb_dirichlet/ui_theta_arb.c', + 'acb_dirichlet/vec_mellin_arb.c', + 'acb_dirichlet/xi.c', + 'acb_dirichlet/zeta_bound.c', + 'acb_dirichlet/zeta.c', + 'acb_dirichlet/zeta_jet.c', + 'acb_dirichlet/zeta_jet_rs.c', + 'acb_dirichlet/zeta_rs_bound.c', + 'acb_dirichlet/zeta_rs.c', + 'acb_dirichlet/zeta_rs_d_coeffs.c', + 'acb_dirichlet/zeta_rs_f_coeffs.c', + 'acb_dirichlet/zeta_rs_r.c', + 'acb_dirichlet/zeta_zeros.c', + 'acb/div.c', + 'acb/dot.c', + 'acb/dot_fmpz.c', + 'acb/dot_precise.c', + 'acb/dot_si.c', + 'acb/dot_simple.c', + 'acb/dot_siui.c', + 'acb/dot_ui.c', + 'acb/dot_uiui.c', + 'acb_elliptic/e.c', + 'acb_elliptic/e_inc.c', + 'acb_elliptic/f.c', + 'acb_elliptic/invariants.c', + 'acb_elliptic/inv_p.c', + 'acb_elliptic/k.c', + 'acb_elliptic/k_jet.c', + 'acb_elliptic/k_series.c', + 'acb_elliptic/p.c', + 'acb_elliptic/pi.c', + 'acb_elliptic/p_jet.c', + 'acb_elliptic/p_prime.c', + 'acb_elliptic/p_series.c', + 'acb_elliptic/rc1.c', + 'acb_elliptic/rf.c', + 'acb_elliptic/rg.c', + 'acb_elliptic/rj.c', + 'acb_elliptic/roots.c', + 'acb_elliptic/zeta.c', + 'acb/exp.c', + 'acb/exp_invexp.c', + 'acb/expm1.c', + 'acb/exp_pi_i.c', + 'acb/gamma.c', + 'acb/get_abs_lbound_arf.c', + 'acb/get_abs_ubound_arf.c', + 'acb/get_mag.c', + 'acb/get_mag_lower.c', + 'acb/get_rad_ubound_arf.c', + 'acb/get_unique_fmpz.c', + 'acb_hypgeom/0f1.c', + 'acb_hypgeom/2f1.c', + 'acb_hypgeom/2f1_choose.c', + 'acb_hypgeom/2f1_continuation.c', + 'acb_hypgeom/2f1_corner.c', + 'acb_hypgeom/2f1_direct.c', + 'acb_hypgeom/2f1_series_direct.c', + 'acb_hypgeom/2f1_transform.c', + 'acb_hypgeom/airy_asymp.c', + 'acb_hypgeom/airy_bound.c', + 'acb_hypgeom/airy.c', + 'acb_hypgeom/airy_direct.c', + 'acb_hypgeom/airy_jet.c', + 'acb_hypgeom/airy_series.c', + 'acb_hypgeom/bessel_i.c', + 'acb_hypgeom/bessel_j.c', + 'acb_hypgeom/bessel_k.c', + 'acb_hypgeom/bessel_y.c', + 'acb_hypgeom/beta_lower.c', + 'acb_hypgeom/beta_lower_series.c', + 'acb_hypgeom/chebyshev_t.c', + 'acb_hypgeom/chebyshev_u.c', + 'acb_hypgeom/chi.c', + 'acb_hypgeom/chi_series.c', + 'acb_hypgeom/ci.c', + 'acb_hypgeom/ci_series.c', + 'acb_hypgeom/coulomb.c', + 'acb_hypgeom/coulomb_jet.c', + 'acb_hypgeom/coulomb_series.c', + 'acb_hypgeom/dilog_bernoulli.c', + 'acb_hypgeom/dilog_bitburst.c', + 'acb_hypgeom/dilog.c', + 'acb_hypgeom/dilog_continuation.c', + 'acb_hypgeom/dilog_transform.c', + 'acb_hypgeom/dilog_zero.c', + 'acb_hypgeom/dilog_zero_taylor.c', + 'acb_hypgeom/ei.c', + 'acb_hypgeom/ei_series.c', + 'acb_hypgeom/erf.c', + 'acb_hypgeom/erfc.c', + 'acb_hypgeom/erfc_series.c', + 'acb_hypgeom/erfi.c', + 'acb_hypgeom/erfi_series.c', + 'acb_hypgeom/erf_series.c', + 'acb_hypgeom/expint.c', + 'acb_hypgeom/fresnel.c', + 'acb_hypgeom/fresnel_series.c', + 'acb_hypgeom/gamma.c', + 'acb_hypgeom/gamma_lower.c', + 'acb_hypgeom/gamma_lower_series.c', + 'acb_hypgeom/gamma_stirling_sum_horner.c', + 'acb_hypgeom/gamma_stirling_sum_improved.c', + 'acb_hypgeom/gamma_taylor.c', + 'acb_hypgeom/gamma_upper.c', + 'acb_hypgeom/gamma_upper_series.c', + 'acb_hypgeom/gegenbauer_c.c', + 'acb_hypgeom/hermite_h.c', + 'acb_hypgeom/jacobi_p.c', + 'acb_hypgeom/laguerre_l.c', + 'acb_hypgeom/legendre_p.c', + 'acb_hypgeom/legendre_p_uiui_rec.c', + 'acb_hypgeom/legendre_q.c', + 'acb_hypgeom/lgamma.c', + 'acb_hypgeom/li.c', + 'acb_hypgeom/li_series.c', + 'acb_hypgeom/log_rising_ui_jet.c', + 'acb_hypgeom/m.c', + 'acb_hypgeom/pfq_bound_factor.c', + 'acb_hypgeom/pfq.c', + 'acb_hypgeom/pfq_choose_n.c', + 'acb_hypgeom/pfq_direct.c', + 'acb_hypgeom/pfq_series_direct.c', + 'acb_hypgeom/pfq_series_sum_bs.c', + 'acb_hypgeom/pfq_series_sum.c', + 'acb_hypgeom/pfq_series_sum_forward.c', + 'acb_hypgeom/pfq_series_sum_rs.c', + 'acb_hypgeom/pfq_sum_bs.c', + 'acb_hypgeom/pfq_sum.c', + 'acb_hypgeom/pfq_sum_fme.c', + 'acb_hypgeom/pfq_sum_forward.c', + 'acb_hypgeom/pfq_sum_rs.c', + 'acb_hypgeom/rising_ui_bs.c', + 'acb_hypgeom/rising_ui.c', + 'acb_hypgeom/rising_ui_forward.c', + 'acb_hypgeom/rising_ui_jet_bs.c', + 'acb_hypgeom/rising_ui_jet.c', + 'acb_hypgeom/rising_ui_jet_powsum.c', + 'acb_hypgeom/rising_ui_jet_rs.c', + 'acb_hypgeom/rising_ui_rec.c', + 'acb_hypgeom/rising_ui_rs.c', + 'acb_hypgeom/shi.c', + 'acb_hypgeom/shi_series.c', + 'acb_hypgeom/si.c', + 'acb_hypgeom/si_series.c', + 'acb_hypgeom/spherical_y.c', + 'acb_hypgeom/u_asymp.c', + 'acb_hypgeom/u.c', + 'acb_hypgeom/u_use_asymp.c', + 'acb/inlines.c', + 'acb/inv.c', + 'acb/io.c', + 'acb/lambertw_asymp.c', + 'acb/lambertw_bound_deriv.c', + 'acb/lambertw.c', + 'acb/lambertw_check_branch.c', + 'acb/log1p.c', + 'acb/log.c', + 'acb/log_sin_pi.c', + 'acb_mat/add.c', + 'acb_mat/approx_eig_qr.c', + 'acb_mat/approx_inv.c', + 'acb_mat/approx_lu.c', + 'acb_mat/approx_mul.c', + 'acb_mat/approx_solve.c', + 'acb_mat/approx_solve_lu_precomp.c', + 'acb_mat/approx_solve_tril.c', + 'acb_mat/approx_solve_triu.c', + 'acb_mat/bound_frobenius_norm.c', + 'acb_mat/bound_inf_norm.c', + 'acb_mat/charpoly.c', + 'acb_mat/clear.c', + 'acb_mat/companion.c', + 'acb_mat/conjugate.c', + 'acb_mat/contains.c', + 'acb_mat/contains_fmpq_mat.c', + 'acb_mat/contains_fmpz_mat.c', + 'acb_mat/det.c', + 'acb_mat/det_lu.c', + 'acb_mat/det_precond.c', + 'acb_mat/dft.c', + 'acb_mat/diag_prod.c', + 'acb_mat/eig_enclosure_rump.c', + 'acb_mat/eig_global_enclosure.c', + 'acb_mat/eig_multiple.c', + 'acb_mat/eig_multiple_rump.c', + 'acb_mat/eig_simple.c', + 'acb_mat/eig_simple_rump.c', + 'acb_mat/eig_simple_vdhoeven_mourrain.c', + 'acb_mat/eq.c', + 'acb_mat/equal.c', + 'acb_mat/exp.c', + 'acb_mat/exp_taylor_sum.c', + 'acb_mat/find_pivot_partial.c', + 'acb_mat/frobenius_norm.c', + 'acb_mat/get_imag.c', + 'acb_mat/get_real.c', + 'acb_mat/indeterminate.c', + 'acb_mat/init.c', + 'acb_mat/inlines.c', + 'acb_mat/inv.c', + 'acb_mat/io.c', + 'acb_mat/is_exact.c', + 'acb_mat/is_finite.c', + 'acb_mat/is_real.c', + 'acb_mat/is_tril.c', + 'acb_mat/is_triu.c', + 'acb_mat/is_zero.c', + 'acb_mat/lu.c', + 'acb_mat/lu_classical.c', + 'acb_mat/lu_recursive.c', + 'acb_mat/mul.c', + 'acb_mat/mul_classical.c', + 'acb_mat/mul_entrywise.c', + 'acb_mat/mul_reorder.c', + 'acb_mat/mul_threaded.c', + 'acb_mat/ne.c', + 'acb_mat/neg.c', + 'acb_mat/one.c', + 'acb_mat/onei.c', + 'acb_mat/ones.c', + 'acb_mat/overlaps.c', + 'acb_mat/pow_ui.c', + 'acb_mat/randtest.c', + 'acb_mat/randtest_eig.c', + 'acb_mat/set_arb_mat.c', + 'acb_mat/set.c', + 'acb_mat/set_fmpq_mat.c', + 'acb_mat/set_fmpz_mat.c', + 'acb_mat/set_real_imag.c', + 'acb_mat/set_round_arb_mat.c', + 'acb_mat/set_round_fmpz_mat.c', + 'acb_mat/solve.c', + 'acb_mat/solve_lu.c', + 'acb_mat/solve_lu_precomp.c', + 'acb_mat/solve_precond.c', + 'acb_mat/solve_tril.c', + 'acb_mat/solve_triu.c', + 'acb_mat/sqr.c', + 'acb_mat/sqr_classical.c', + 'acb_mat/sub.c', + 'acb_mat/trace.c', + 'acb_mat/transpose.c', + 'acb_mat/vector_mul.c', + 'acb_mat/window_init.c', + 'acb_mat/zero.c', + 'acb_modular/addseq.c', + 'acb_modular/delta.c', + 'acb_modular/eisenstein.c', + 'acb_modular/elliptic_e.c', + 'acb_modular/elliptic_k.c', + 'acb_modular/elliptic_k_cpx.c', + 'acb_modular/elliptic_p.c', + 'acb_modular/elliptic_p_zpx.c', + 'acb_modular/epsilon_arg.c', + 'acb_modular/eta.c', + 'acb_modular/eta_sum.c', + 'acb_modular/fill_addseq.c', + 'acb_modular/fundamental_domain_approx_arf.c', + 'acb_modular/fundamental_domain_approx.c', + 'acb_modular/fundamental_domain_approx_d.c', + 'acb_modular/hilbert_class_poly.c', + 'acb_modular/inlines.c', + 'acb_modular/io.c', + 'acb_modular/is_in_fundamental_domain.c', + 'acb_modular/j.c', + 'acb_modular/lambda.c', + 'acb_modular/psl2z.c', + 'acb_modular/theta.c', + 'acb_modular/theta_const_sum_basecase.c', + 'acb_modular/theta_const_sum.c', + 'acb_modular/theta_const_sum_rs.c', + 'acb_modular/theta_jet.c', + 'acb_modular/theta_jet_notransform.c', + 'acb_modular/theta_series.c', + 'acb_modular/theta_sum.c', + 'acb_modular/theta_transform.c', + 'acb_modular/transform.c', + 'acb/mul.c', + 'acb/mul_naive.c', + 'acb_poly/add.c', + 'acb_poly/add_series.c', + 'acb_poly/add_si.c', + 'acb_poly/agm1_series.c', + 'acb_poly/atan_series.c', + 'acb_poly/binomial_transform_basecase.c', + 'acb_poly/binomial_transform.c', + 'acb_poly/binomial_transform_convolution.c', + 'acb_poly/borel_transform.c', + 'acb_poly/clear.c', + 'acb_poly/compose.c', + 'acb_poly/compose_series.c', + 'acb_poly/contains.c', + 'acb_poly/contains_fmpq_poly.c', + 'acb_poly/contains_fmpz_poly.c', + 'acb_poly/cosh_series.c', + 'acb_poly/cos_pi_series.c', + 'acb_poly/cos_series.c', + 'acb_poly/cot_pi_series.c', + 'acb_poly/derivative.c', + 'acb_poly/digamma_series.c', + 'acb_poly/divrem.c', + 'acb_poly/div_root.c', + 'acb_poly/div_series.c', + 'acb_poly/elliptic_k_series.c', + 'acb_poly/elliptic_p_series.c', + 'acb_poly/equal.c', + 'acb_poly/erf_series.c', + 'acb_poly/evaluate2.c', + 'acb_poly/evaluate2_horner.c', + 'acb_poly/evaluate2_rectangular.c', + 'acb_poly/evaluate.c', + 'acb_poly/evaluate_horner.c', + 'acb_poly/evaluate_rectangular.c', + 'acb_poly/evaluate_vec_fast.c', + 'acb_poly/evaluate_vec_iter.c', + 'acb_poly/exp_pi_i_series.c', + 'acb_poly/exp_series_basecase.c', + 'acb_poly/exp_series.c', + 'acb_poly/find_roots.c', + 'acb_poly/fit_length.c', + 'acb/polygamma.c', + 'acb_poly/gamma_series.c', + 'acb_poly/get_coeff_acb.c', + 'acb_poly/get_unique_fmpz_poly.c', + 'acb_poly/graeffe_transform.c', + 'acb_poly/init.c', + 'acb_poly/inlines.c', + 'acb_poly/integral.c', + 'acb_poly/interpolate_barycentric.c', + 'acb_poly/interpolate_fast.c', + 'acb_poly/interpolate_newton.c', + 'acb_poly/inv_borel_transform.c', + 'acb_poly/inv_series.c', + 'acb_poly/io.c', + 'acb_poly/lambertw_series.c', + 'acb_poly/lgamma_series.c', + 'acb_poly/log1p_series.c', + 'acb/polylog.c', + 'acb_poly/log_series.c', + 'acb_poly/majorant.c', + 'acb_poly/mul.c', + 'acb_poly/mullow.c', + 'acb_poly/mullow_classical.c', + 'acb_poly/mullow_transpose.c', + 'acb_poly/mullow_transpose_gauss.c', + 'acb_poly/normalise.c', + 'acb_poly/nth_derivative.c', + 'acb_poly/overlaps.c', + 'acb_poly/polylog_series.c', + 'acb_poly/pow_acb_series.c', + 'acb_poly/pow_series.c', + 'acb_poly/powsum_one_series_sieved.c', + 'acb_poly/powsum_series_naive.c', + 'acb_poly/powsum_series_naive_threaded.c', + 'acb_poly/pow_ui.c', + 'acb_poly/pow_ui_trunc_binexp.c', + 'acb_poly/product_roots.c', + 'acb_poly/randtest.c', + 'acb_poly/refine_roots_durand_kerner.c', + 'acb_poly/reverse.c', + 'acb_poly/revert_series.c', + 'acb_poly/rgamma_series.c', + 'acb_poly/rising_ui_series.c', + 'acb_poly/root_bound_fujiwara.c', + 'acb_poly/root_inclusion.c', + 'acb_poly/rsqrt_series.c', + 'acb_poly/set2_arb_poly.c', + 'acb_poly/set2_fmpq_poly.c', + 'acb_poly/set2_fmpz_poly.c', + 'acb_poly/set.c', + 'acb_poly/set_coeff_acb.c', + 'acb_poly/set_coeff_si.c', + 'acb_poly/set_fmpz_poly.c', + 'acb_poly/set_length.c', + 'acb_poly/set_round.c', + 'acb_poly/set_si.c', + 'acb_poly/set_trunc.c', + 'acb_poly/set_trunc_round.c', + 'acb_poly/shift_left.c', + 'acb_poly/shift_right.c', + 'acb_poly/sin_cos_series.c', + 'acb_poly/sinc_series.c', + 'acb_poly/sinh_cosh_series_basecase.c', + 'acb_poly/sinh_cosh_series.c', + 'acb_poly/sinh_cosh_series_exponential.c', + 'acb_poly/sinh_series.c', + 'acb_poly/sin_pi_series.c', + 'acb_poly/sin_series.c', + 'acb_poly/sqrt_series.c', + 'acb_poly/sub.c', + 'acb_poly/sub_series.c', + 'acb_poly/tan_series.c', + 'acb_poly/taylor_shift.c', + 'acb_poly/tree.c', + 'acb_poly/validate_real_roots.c', + 'acb_poly/validate_roots.c', + 'acb_poly/valuation.c', + 'acb_poly/zeta_em_bound.c', + 'acb_poly/zeta_em_choose_param.c', + 'acb_poly/zeta_em_sum.c', + 'acb_poly/zeta_em_tail_bsplit.c', + 'acb_poly/zeta_em_tail_naive.c', + 'acb_poly/zeta_series.c', + 'acb/pow.c', + 'acb/quadratic_roots_fmpz.c', + 'acb/randtest.c', + 'acb/real_abs.c', + 'acb/real_ceil.c', + 'acb/real_floor.c', + 'acb/real_heaviside.c', + 'acb/real_max.c', + 'acb/real_min.c', + 'acb/real_sgn.c', + 'acb/real_sqrtpos.c', + 'acb/rel_error_bits.c', + 'acb/rising2_ui.c', + 'acb/rising_ui.c', + 'acb/rising_ui_get_mag.c', + 'acb/root_ui.c', + 'acb/rsqrt.c', + 'acb/sech.c', + 'acb/sgn.c', + 'acb/sin.c', + 'acb/sinc.c', + 'acb/sin_cos.c', + 'acb/sin_cos_pi.c', + 'acb/sinc_pi.c', + 'acb/sin_pi.c', + 'acb/sqrt.c', + 'acb/sqrts.c', + 'acb/submul.c', + 'acb/tan.c', + 'acb/tan_pi.c', + 'acb_theta/agm_hadamard.c', + 'acb_theta/agm_mul.c', + 'acb_theta/agm_mul_tight.c', + 'acb_theta/agm_sqrt.c', + 'acb_theta/all.c', + 'acb_theta/char_dot_acb.c', + 'acb_theta/char_dot.c', + 'acb_theta/char_dot_slong.c', + 'acb_theta/char_get_a.c', + 'acb_theta/char_get_acb.c', + 'acb_theta/char_get_arb.c', + 'acb_theta/char_get_slong.c', + 'acb_theta/char_is_even.c', + 'acb_theta/char_is_goepel.c', + 'acb_theta/char_is_syzygous.c', + 'acb_theta/dist_a0.c', + 'acb_theta/dist_addprec.c', + 'acb_theta/dist_lat.c', + 'acb_theta/dist_pt.c', + 'acb_theta/eld_border.c', + 'acb_theta/eld_clear.c', + 'acb_theta/eld_contains.c', + 'acb_theta/eld_init.c', + 'acb_theta/eld_points.c', + 'acb_theta/eld_print.c', + 'acb_theta/eld_set.c', + 'acb_theta/g2_character.c', + 'acb_theta/g2_chi10.c', + 'acb_theta/g2_chi12.c', + 'acb_theta/g2_chi35.c', + 'acb_theta/g2_chi3_6.c', + 'acb_theta/g2_chi5.c', + 'acb_theta/g2_covariants.c', + 'acb_theta/g2_covariants_lead.c', + 'acb_theta/g2_detk_symj.c', + 'acb_theta/g2_jet_naive_1.c', + 'acb_theta/g2_psi4.c', + 'acb_theta/g2_psi6.c', + 'acb_theta/g2_sextic.c', + 'acb_theta/g2_sextic_chi5.c', + 'acb_theta/g2_transvectant.c', + 'acb_theta/g2_transvectant_lead.c', + 'acb_theta/jet_all.c', + 'acb_theta/jet_compose.c', + 'acb_theta/jet_error_bounds.c', + 'acb_theta/jet_exp_pi_i.c', + 'acb_theta/jet_index.c', + 'acb_theta/jet_mul.c', + 'acb_theta/jet_naive_00.c', + 'acb_theta/jet_naive_all.c', + 'acb_theta/jet_naive_fixed_ab.c', + 'acb_theta/jet_naive_radius.c', + 'acb_theta/jet_nb.c', + 'acb_theta/jet_ql_all.c', + 'acb_theta/jet_ql_bounds.c', + 'acb_theta/jet_ql_finite_diff.c', + 'acb_theta/jet_ql_radius.c', + 'acb_theta/jet_total_order.c', + 'acb_theta/jet_tuples.c', + 'acb_theta/naive_00.c', + 'acb_theta/naive_0b.c', + 'acb_theta/naive_all.c', + 'acb_theta/naive_fixed_ab.c', + 'acb_theta/naive_fixed_a.c', + 'acb_theta/naive_radius.c', + 'acb_theta/naive_reduce.c', + 'acb_theta/naive_term.c', + 'acb_theta/naive_worker.c', + 'acb_theta/ql_a0.c', + 'acb_theta/ql_a0_naive.c', + 'acb_theta/ql_a0_nb_steps.c', + 'acb_theta/ql_a0_split.c', + 'acb_theta/ql_a0_steps.c', + 'acb_theta/ql_all.c', + 'acb_theta/ql_reduce.c', + 'acb_theta/siegel_cho.c', + 'acb_theta/siegel_cocycle.c', + 'acb_theta/siegel_is_reduced.c', + 'acb_theta/siegel_randtest.c', + 'acb_theta/siegel_randtest_reduced.c', + 'acb_theta/siegel_randtest_vec.c', + 'acb_theta/siegel_reduce.c', + 'acb_theta/siegel_transform.c', + 'acb_theta/siegel_transform_cocycle_inv.c', + 'acb_theta/siegel_transform_z.c', + 'acb_theta/siegel_yinv.c', + 'acb_theta/sp2gz_block_diag.c', + 'acb_theta/sp2gz_decompose.c', + 'acb_theta/sp2gz_embed.c', + 'acb_theta/sp2gz_fundamental.c', + 'acb_theta/sp2gz_inv.c', + 'acb_theta/sp2gz_is_block_diag.c', + 'acb_theta/sp2gz_is_correct.c', + 'acb_theta/sp2gz_is_embedded.c', + 'acb_theta/sp2gz_is_j.c', + 'acb_theta/sp2gz_is_trig.c', + 'acb_theta/sp2gz_j.c', + 'acb_theta/sp2gz_nb_fundamental.c', + 'acb_theta/sp2gz_randtest.c', + 'acb_theta/sp2gz_restrict.c', + 'acb_theta/sp2gz_set_blocks.c', + 'acb_theta/sp2gz_trig.c', + 'acb_theta/transform_char.c', + 'acb_theta/transform_kappa2.c', + 'acb_theta/transform_kappa.c', + 'acb_theta/transform_proj.c', + 'acb_theta/transform_sqrtdet.c', + 'acb/unit_root.c', + 'acb/urandom.c', + 'acb/vec_clear.c', + 'acb/vec_init.c', + 'acb/vec_set_powers.c', + 'acb/vec_sort_pretty.c', + 'acb/vec_unit_roots.c', + 'acb/zeta.c', + 'acf/approx_div.c', + 'acf/approx_dot.c', + 'acf/approx_sqrt.c', + 'acf/inlines.c', + 'aprcl/config_gauss.c', + 'aprcl/config_jacobi.c', + 'aprcl/f_table.c', + 'aprcl/is_mul_coprime.c', + 'aprcl/is_prime.c', + 'aprcl/is_prime_final_division.c', + 'aprcl/is_prime_gauss.c', + 'aprcl/is_prime_jacobi.c', + 'aprcl/unity_zp_add.c', + 'aprcl/unity_zp_aut.c', + 'aprcl/unity_zp_aut_inv.c', + 'aprcl/unity_zp_auxiliary_routine.c', + 'aprcl/unity_zp_coeff.c', + 'aprcl/unity_zp_copy.c', + 'aprcl/unity_zp_equal.c', + 'aprcl/unity_zp_init.c', + 'aprcl/unity_zp_is_unity.c', + 'aprcl/unity_zp_jacobi_sum.c', + 'aprcl/unity_zp_mul.c', + 'aprcl/unity_zp_pow_2k.c', + 'aprcl/unity_zp_pow.c', + 'aprcl/unity_zp_pow_select_k.c', + 'aprcl/unity_zp_pow_sliding.c', + 'aprcl/unity_zpq_add.c', + 'aprcl/unity_zpq_clear.c', + 'aprcl/unity_zpq_coeff_add.c', + 'aprcl/unity_zpq_coeff_set.c', + 'aprcl/unity_zpq_copy.c', + 'aprcl/unity_zpq_equal.c', + 'aprcl/unity_zpq_gauss_sum.c', + 'aprcl/unity_zpq_gauss_sum_character_pow.c', + 'aprcl/unity_zpq_init.c', + 'aprcl/unity_zpq_mul.c', + 'aprcl/unity_zpq_mul_unity_p.c', + 'aprcl/unity_zpq_pow.c', + 'aprcl/unity_zpq_swap.c', + 'aprcl/unity_zp_reduce_cyclotomic.c', + 'aprcl/unity_zp_set_zero.c', + 'aprcl/unity_zp_sqr.c', + 'aprcl/unity_zp_swap.c', + 'aprcl/utility.c', + 'arb/abs.c', + 'arb/acos.c', + 'arb/acosh.c', + 'arb/add.c', + 'arb/add_error.c', + 'arb/addmul.c', + 'arb/agm.c', + 'arb/approx_dot.c', + 'arb/asin.c', + 'arb/asinh.c', + 'arb/atan2.c', + 'arb/atan_arf_bb.c', + 'arb/atan_arf.c', + 'arb/atan.c', + 'arb/atan_frac_bsplit.c', + 'arb/atanh.c', + 'arb/atan_newton.c', + 'arb/atan_sum_bs_powtab.c', + 'arb/atan_sum_bs_simple.c', + 'arb/atan_tab.c', + 'arb/atan_taylor_naive.c', + 'arb/atan_taylor_rs.c', + 'arb/bell_fmpz.c', + 'arb/bell_sum_bsplit.c', + 'arb/bell_sum_taylor.c', + 'arb/bernoulli_fmpz.c', + 'arb/bernoulli_poly_ui.c', + 'arb/bernoulli_ui.c', + 'arb/bernoulli_ui_zeta.c', + 'arb/bin.c', + 'arb_calc/io.c', + 'arb_calc/isolate_roots.c', + 'arb_calc/newton_conv_factor.c', + 'arb_calc/newton_step.c', + 'arb_calc/refine_root_bisect.c', + 'arb_calc/refine_root_newton.c', + 'arb_calc/verbose.c', + 'arb/can_round_mpfr.c', + 'arb/ceil.c', + 'arb/chebyshev_t_ui.c', + 'arb/chebyshev_u_ui.c', + 'arb/clear.c', + 'arb/const_apery.c', + 'arb/const_catalan.c', + 'arb/const_e.c', + 'arb/const_euler.c', + 'arb/const_glaisher.c', + 'arb/const_khinchin.c', + 'arb/const_log10.c', + 'arb/const_log2.c', + 'arb/const_log_sqrt2pi.c', + 'arb/const_pi.c', + 'arb/const_reciprocal_fibonacci.c', + 'arb/const_sqrt_pi.c', + 'arb/contains.c', + 'arb/cot.c', + 'arb/coth.c', + 'arb/cot_pi.c', + 'arb/csc.c', + 'arb/csch.c', + 'arb/csc_pi.c', + 'arb/digamma.c', + 'arb/div_2expm1_ui.c', + 'arb/div.c', + 'arb/dot.c', + 'arb/dot_fmpz.c', + 'arb/dot_precise.c', + 'arb/dot_si.c', + 'arb/dot_simple.c', + 'arb/dot_siui.c', + 'arb/dot_ui.c', + 'arb/dot_uiui.c', + 'arb/doublefac_ui.c', + 'arb/euler_number_fmpz.c', + 'arb/euler_number_ui.c', + 'arb/exp_arf_bb.c', + 'arb/exp_arf.c', + 'arb/exp_arf_rs_generic.c', + 'arb/exp.c', + 'arb/exp_sum_bs_powtab.c', + 'arb/exp_sum_bs_simple.c', + 'arb/exp_tab.c', + 'arb/exp_taylor_bound.c', + 'arb/exp_taylor_naive.c', + 'arb/exp_taylor_rs.c', + 'arb/fac.c', + 'arb/fib.c', + 'arb/floor.c', + 'arb/fma.c', + 'arb_fmpz_poly/complex_roots.c', + 'arb_fmpz_poly/deflate.c', + 'arb_fmpz_poly/deflation.c', + 'arb_fmpz_poly/evaluate_acb.c', + 'arb_fmpz_poly/evaluate_acb_horner.c', + 'arb_fmpz_poly/evaluate_acb_rectangular.c', + 'arb_fmpz_poly/evaluate_arb.c', + 'arb_fmpz_poly/evaluate_arb_horner.c', + 'arb_fmpz_poly/evaluate_arb_rectangular.c', + 'arb_fmpz_poly/gauss_period_minpoly.c', + 'arb_fpwrap/fpwrap.c', + 'arb/gamma.c', + 'arb/get_abs_lbound_arf.c', + 'arb/get_abs_ubound_arf.c', + 'arb/get_fmpz_mid_rad_10exp.c', + 'arb/get_interval_arf.c', + 'arb/get_interval_fmpz_2exp.c', + 'arb/get_interval_mpfr.c', + 'arb/get_lbound_arf.c', + 'arb/get_mag_lower.c', + 'arb/get_mag_lower_nonnegative.c', + 'arb/get_mpn_fixed_mod_log2.c', + 'arb/get_mpn_fixed_mod_pi4.c', + 'arb/get_rand_fmpq.c', + 'arb/get_str.c', + 'arb/get_ubound_arf.c', + 'arb/get_unique_fmpz.c', + 'arb/hurwitz_zeta.c', + 'arb_hypgeom/1f1_integration.c', + 'arb_hypgeom/2f1_integration.c', + 'arb_hypgeom/airy.c', + 'arb_hypgeom/airy_jet.c', + 'arb_hypgeom/airy_series.c', + 'arb_hypgeom/airy_zero.c', + 'arb_hypgeom/bessel_i_integration.c', + 'arb_hypgeom/bessel_k_integration.c', + 'arb_hypgeom/beta_lower_series.c', + 'arb_hypgeom/central_bin_ui.c', + 'arb_hypgeom/chi_series.c', + 'arb_hypgeom/ci.c', + 'arb_hypgeom/ci_series.c', + 'arb_hypgeom/coulomb.c', + 'arb_hypgeom/coulomb_jet.c', + 'arb_hypgeom/coulomb_series.c', + 'arb_hypgeom/ei_series.c', + 'arb_hypgeom/erf.c', + 'arb_hypgeom/erfc_series.c', + 'arb_hypgeom/erfinv.c', + 'arb_hypgeom/erfi_series.c', + 'arb_hypgeom/erf_series.c', + 'arb_hypgeom/fresnel_series.c', + 'arb_hypgeom/gamma.c', + 'arb_hypgeom/gamma_fmpq.c', + 'arb_hypgeom/gamma_lower_series.c', + 'arb_hypgeom/gamma_lower_sum_rs.c', + 'arb_hypgeom/gamma_stirling_sum_horner.c', + 'arb_hypgeom/gamma_stirling_sum_improved.c', + 'arb_hypgeom/gamma_stirling_term_bounds.c', + 'arb_hypgeom/gamma_tab.c', + 'arb_hypgeom/gamma_taylor.c', + 'arb_hypgeom/gamma_upper_fmpq.c', + 'arb_hypgeom/gamma_upper_fmpq_step_bsplit.c', + 'arb_hypgeom/gamma_upper_integration.c', + 'arb_hypgeom/gamma_upper_series.c', + 'arb_hypgeom/gamma_upper_sum_rs.c', + 'arb_hypgeom/legendre_p.c', + 'arb_hypgeom/legendre_p_ui_asymp.c', + 'arb_hypgeom/legendre_p_ui.c', + 'arb_hypgeom/legendre_p_ui_one.c', + 'arb_hypgeom/legendre_p_ui_rec.c', + 'arb_hypgeom/legendre_p_ui_root.c', + 'arb_hypgeom/legendre_p_ui_zero.c', + 'arb_hypgeom/lgamma.c', + 'arb_hypgeom/li_series.c', + 'arb_hypgeom/rising_ui_bs.c', + 'arb_hypgeom/rising_ui.c', + 'arb_hypgeom/rising_ui_forward.c', + 'arb_hypgeom/rising_ui_jet_bs.c', + 'arb_hypgeom/rising_ui_jet.c', + 'arb_hypgeom/rising_ui_jet_powsum.c', + 'arb_hypgeom/rising_ui_jet_rs.c', + 'arb_hypgeom/rising_ui_rec.c', + 'arb_hypgeom/rising_ui_rs.c', + 'arb_hypgeom/shi_series.c', + 'arb_hypgeom/si.c', + 'arb_hypgeom/si_series.c', + 'arb_hypgeom/sum_fmpq_arb_bs.c', + 'arb_hypgeom/sum_fmpq_arb.c', + 'arb_hypgeom/sum_fmpq_arb_forward.c', + 'arb_hypgeom/sum_fmpq_arb_rs.c', + 'arb_hypgeom/sum_fmpq_imag_arb_bs.c', + 'arb_hypgeom/sum_fmpq_imag_arb.c', + 'arb_hypgeom/sum_fmpq_imag_arb_forward.c', + 'arb_hypgeom/sum_fmpq_imag_arb_rs.c', + 'arb_hypgeom/u_integration.c', + 'arb_hypgeom/wrappers.c', + 'arb/hypot.c', + 'arb/indeterminate.c', + 'arb/inlines.c', + 'arb/intersection.c', + 'arb/io.c', + 'arb/is_finite.c', + 'arb/lambertw.c', + 'arb/log1p.c', + 'arb/log_arf.c', + 'arb/log_base_ui.c', + 'arb/log.c', + 'arb/log_hypot.c', + 'arb/log_newton.c', + 'arb/log_precompute_reductions.c', + 'arb/log_primes.c', + 'arb/log_reduce.c', + 'arb/log_tab.c', + 'arb/log_ui.c', + 'arb_mat/add.c', + 'arb_mat/addmul_rad_mag_fast.c', + 'arb_mat/approx_inv.c', + 'arb_mat/approx_lu.c', + 'arb_mat/approx_mul.c', + 'arb_mat/approx_solve.c', + 'arb_mat/approx_solve_lu_precomp.c', + 'arb_mat/approx_solve_tril.c', + 'arb_mat/approx_solve_triu.c', + 'arb_mat/bound_frobenius_norm.c', + 'arb_mat/bound_inf_norm.c', + 'arb_mat/charpoly.c', + 'arb_mat/cho.c', + 'arb_mat/clear.c', + 'arb_mat/companion.c', + 'arb_mat/contains.c', + 'arb_mat/contains_fmpq_mat.c', + 'arb_mat/contains_fmpz_mat.c', + 'arb_mat/count_is_zero.c', + 'arb_mat/dct.c', + 'arb_mat/det.c', + 'arb_mat/det_lu.c', + 'arb_mat/det_precond.c', + 'arb_mat/diag_prod.c', + 'arb_mat/entrywise_is_zero.c', + 'arb_mat/entrywise_not_is_zero.c', + 'arb_mat/eq.c', + 'arb_mat/equal.c', + 'arb_mat/exp.c', + 'arb_mat/exp_taylor_sum.c', + 'arb_mat/find_pivot_partial.c', + 'arb_mat/frobenius_norm.c', + 'arb_mat/hilbert.c', + 'arb_mat/indeterminate.c', + 'arb_mat/init.c', + 'arb_mat/inlines.c', + 'arb_mat/inv.c', + 'arb_mat/inv_cho_precomp.c', + 'arb_mat/inv_ldl_precomp.c', + 'arb_mat/io.c', + 'arb_mat/is_exact.c', + 'arb_mat/is_finite.c', + 'arb_mat/is_tril.c', + 'arb_mat/is_triu.c', + 'arb_mat/is_zero.c', + 'arb_mat/ldl.c', + 'arb_mat/lu.c', + 'arb_mat/lu_classical.c', + 'arb_mat/lu_recursive.c', + 'arb_mat/mul_block.c', + 'arb_mat/mul.c', + 'arb_mat/mul_classical.c', + 'arb_mat/mul_entrywise.c', + 'arb_mat/mul_threaded.c', + 'arb_mat/ne.c', + 'arb_mat/neg.c', + 'arb_mat/one.c', + 'arb_mat/ones.c', + 'arb_mat/overlaps.c', + 'arb_mat/pascal.c', + 'arb_mat/pow_ui.c', + 'arb_mat/randtest.c', + 'arb_mat/randtest_cho.c', + 'arb_mat/randtest_spd.c', + 'arb_mat/set.c', + 'arb_mat/set_fmpq_mat.c', + 'arb_mat/set_fmpz_mat.c', + 'arb_mat/set_round_fmpz_mat.c', + 'arb_mat/solve.c', + 'arb_mat/solve_cho_precomp.c', + 'arb_mat/solve_ldl_precomp.c', + 'arb_mat/solve_lu.c', + 'arb_mat/solve_lu_precomp.c', + 'arb_mat/solve_preapprox.c', + 'arb_mat/solve_precond.c', + 'arb_mat/solve_tril.c', + 'arb_mat/solve_triu.c', + 'arb_mat/spd_get_fmpz_mat.c', + 'arb_mat/spd_inv.c', + 'arb_mat/spd_is_lll_reduced.c', + 'arb_mat/spd_lll_reduce.c', + 'arb_mat/spd_solve.c', + 'arb_mat/sqr.c', + 'arb_mat/sqr_classical.c', + 'arb_mat/stirling.c', + 'arb_mat/sub.c', + 'arb_mat/trace.c', + 'arb_mat/transpose.c', + 'arb_mat/vector_mul.c', + 'arb_mat/window_init.c', + 'arb_mat/zero.c', + 'arb/max.c', + 'arb/min.c', + 'arb/minmax.c', + 'arb/mul_2exp_si.c', + 'arb/mul.c', + 'arb/neg.c', + 'arb/neg_round.c', + 'arb/nint.c', + 'arb/nonnegative_abs.c', + 'arb/nonnegative_part.c', + 'arb/one.c', + 'arb/overlaps.c', + 'arb/partitions_fmpz.c', + 'arb_poly/acos_series.c', + 'arb_poly/add.c', + 'arb_poly/add_series.c', + 'arb_poly/add_si.c', + 'arb_poly/asin_series.c', + 'arb_poly/atan_series.c', + 'arb_poly/binomial_transform_basecase.c', + 'arb_poly/binomial_transform.c', + 'arb_poly/binomial_transform_convolution.c', + 'arb_poly/borel_transform.c', + 'arb_poly/clear.c', + 'arb_poly/compose.c', + 'arb_poly/compose_series.c', + 'arb_poly/contains.c', + 'arb_poly/contains_fmpq_poly.c', + 'arb_poly/contains_fmpz_poly.c', + 'arb_poly/cosh_series.c', + 'arb_poly/cos_pi_series.c', + 'arb_poly/cos_series.c', + 'arb_poly/cot_pi_series.c', + 'arb_poly/derivative.c', + 'arb_poly/digamma_series.c', + 'arb_poly/divrem.c', + 'arb_poly/div_root.c', + 'arb_poly/div_series.c', + 'arb_poly/equal.c', + 'arb_poly/evaluate2_acb.c', + 'arb_poly/evaluate2_acb_horner.c', + 'arb_poly/evaluate2_acb_rectangular.c', + 'arb_poly/evaluate2.c', + 'arb_poly/evaluate2_horner.c', + 'arb_poly/evaluate2_rectangular.c', + 'arb_poly/evaluate_acb.c', + 'arb_poly/evaluate_acb_horner.c', + 'arb_poly/evaluate_acb_rectangular.c', + 'arb_poly/evaluate.c', + 'arb_poly/evaluate_horner.c', + 'arb_poly/evaluate_rectangular.c', + 'arb_poly/evaluate_vec_fast.c', + 'arb_poly/evaluate_vec_iter.c', + 'arb_poly/exp_series_basecase.c', + 'arb_poly/exp_series.c', + 'arb_poly/fit_length.c', + 'arb_poly/gamma_series.c', + 'arb_poly/get_coeff_arb.c', + 'arb_poly/get_unique_fmpz_poly.c', + 'arb_poly/graeffe_transform.c', + 'arb_poly/init.c', + 'arb_poly/inlines.c', + 'arb_poly/integral.c', + 'arb_poly/interpolate_barycentric.c', + 'arb_poly/interpolate_fast.c', + 'arb_poly/interpolate_newton.c', + 'arb_poly/inv_borel_transform.c', + 'arb_poly/inv_series.c', + 'arb_poly/io.c', + 'arb_poly/lambertw_series.c', + 'arb_poly/lgamma_series.c', + 'arb_poly/log1p_series.c', + 'arb/polylog.c', + 'arb_poly/log_series.c', + 'arb_poly/majorant.c', + 'arb_poly/mul.c', + 'arb_poly/mullow_block.c', + 'arb_poly/mullow.c', + 'arb_poly/mullow_classical.c', + 'arb_poly/newton_convergence_factor.c', + 'arb_poly/newton_refine_root.c', + 'arb_poly/newton_step.c', + 'arb_poly/normalise.c', + 'arb_poly/nth_derivative.c', + 'arb_poly/overlaps.c', + 'arb_poly/pow_arb_series.c', + 'arb_poly/pow_series.c', + 'arb_poly/pow_ui.c', + 'arb_poly/pow_ui_trunc_binexp.c', + 'arb_poly/product_roots.c', + 'arb_poly/product_roots_complex.c', + 'arb_poly/randtest.c', + 'arb_poly/reverse.c', + 'arb_poly/revert_series.c', + 'arb_poly/rgamma_series.c', + 'arb_poly/riemann_siegel_theta_series.c', + 'arb_poly/riemann_siegel_z_series.c', + 'arb_poly/rising_ui_series.c', + 'arb_poly/root_bound_fujiwara.c', + 'arb_poly/rsqrt_series.c', + 'arb_poly/set.c', + 'arb_poly/set_coeff_arb.c', + 'arb_poly/set_coeff_si.c', + 'arb_poly/set_fmpq_poly.c', + 'arb_poly/set_fmpz_poly.c', + 'arb_poly/set_length.c', + 'arb_poly/set_round.c', + 'arb_poly/set_si.c', + 'arb_poly/set_trunc.c', + 'arb_poly/set_trunc_round.c', + 'arb_poly/shift_left.c', + 'arb_poly/shift_right.c', + 'arb_poly/sin_cos_series.c', + 'arb_poly/sinc_pi_series.c', + 'arb_poly/sinc_series.c', + 'arb_poly/sinh_cosh_series_basecase.c', + 'arb_poly/sinh_cosh_series.c', + 'arb_poly/sinh_cosh_series_exponential.c', + 'arb_poly/sinh_series.c', + 'arb_poly/sin_pi_series.c', + 'arb_poly/sin_series.c', + 'arb_poly/sqrt_series.c', + 'arb_poly/sub.c', + 'arb_poly/sub_series.c', + 'arb_poly/swinnerton_dyer_ui.c', + 'arb_poly/tan_series.c', + 'arb_poly/taylor_shift.c', + 'arb_poly/tree.c', + 'arb_poly/valuation.c', + 'arb_poly/zeta_series.c', + 'arb/pow.c', + 'arb/power_sum_vec.c', + 'arb/pow_fmpq.c', + 'arb/pow_fmpz_binexp.c', + 'arb/pow_fmpz.c', + 'arb/primorial.c', + 'arb/randtest.c', + 'arb/rel_error_bits.c', + 'arb/richcmp.c', + 'arb/rising2_ui.c', + 'arb/rising_fmpq_ui.c', + 'arb/rising_ui.c', + 'arb/root_ui.c', + 'arb/sec.c', + 'arb/sech.c', + 'arb/set.c', + 'arb/set_interval.c', + 'arb/set_round.c', + 'arb/set_str.c', + 'arb/sgn.c', + 'arb/sgn_nonzero.c', + 'arb/sinc.c', + 'arb/sin_cos_arf_bb.c', + 'arb/sin_cos_arf_generic.c', + 'arb/sin_cos.c', + 'arb/sin_cos_generic.c', + 'arb/sin_cos_pi.c', + 'arb/sin_cos_pi_fmpq_algebraic.c', + 'arb/sin_cos_pi_fmpq.c', + 'arb/sin_cos_tab.c', + 'arb/sin_cos_taylor_naive.c', + 'arb/sin_cos_taylor_rs.c', + 'arb/sin_cos_wide.c', + 'arb/sinc_pi.c', + 'arb/sinh_cosh.c', + 'arb/sqrt1pm1.c', + 'arb/sqrt.c', + 'arb/sqrtpos.c', + 'arb/sub.c', + 'arb/submul.c', + 'arb/tan.c', + 'arb/tanh.c', + 'arb/tan_pi.c', + 'arb/trim.c', + 'arb/trunc.c', + 'arb/ui_pow_ui.c', + 'arb/union.c', + 'arb/urandom.c', + 'arb/vec_clear.c', + 'arb/vec_get_mag.c', + 'arb/vec_init.c', + 'arb/vec_set_powers.c', + 'arb/zero.c', + 'arb/zeta.c', + 'arb/zeta_ui_bernoulli.c', + 'arb/zeta_ui_borwein_bsplit.c', + 'arb/zeta_ui.c', + 'arb/zeta_ui_euler_product.c', + 'arb/zeta_ui_vec_borwein.c', + 'arb/zeta_ui_vec.c', + 'arb/zeta_ui_vec_even.c', + 'arb/zeta_ui_vec_odd.c', + 'arf/abs_bound_lt_2exp_si.c', + 'arf/add.c', + 'arf/add_mpn.c', + 'arf/addmul.c', + 'arf/approx_dot.c', + 'arf/call_mpfr_func.c', + 'arf/ceil.c', + 'arf/clear.c', + 'arf/cmp.c', + 'arf/complex_mul.c', + 'arf/debug.c', + 'arf/div.c', + 'arf/equal.c', + 'arf/floor.c', + 'arf/fma.c', + 'arf/frexp.c', + 'arf/get.c', + 'arf/inlines.c', + 'arf/io.c', + 'arf/is_int_2exp_si.c', + 'arf/is_int.c', + 'arf/memory_manager.c', + 'arf/mul_rnd_any.c', + 'arf/mul_rnd_down.c', + 'arf/mul_special.c', + 'arf/mul_tmp_cleanup.c', + 'arf/mul_via_mpfr.c', + 'arf/neg_round.c', + 'arf/randtest.c', + 'arf/root.c', + 'arf/rsqrt.c', + 'arf/set.c', + 'arf/set_round.c', + 'arf/sosq.c', + 'arf/sqrt.c', + 'arf/sub.c', + 'arf/submul.c', + 'arf/sum.c', + 'arf/urandom.c', + 'arith/bell_number.c', + 'arith/bell_number_dobinski.c', + 'arith/bell_number_multi_mod.c', + 'arith/bell_number_nmod.c', + 'arith/bell_number_nmod_vec.c', + 'arith/bell_number_nmod_vec_ogf.c', + 'arith/bell_number_nmod_vec_recursive.c', + 'arith/bell_number_nmod_vec_series.c', + 'arith/bell_number_size.c', + 'arith/bell_number_vec.c', + 'arith/bell_number_vec_multi_mod.c', + 'arith/bell_number_vec_recursive.c', + 'arith/bernoulli_number.c', + 'arith/bernoulli_number_denom.c', + 'arith/bernoulli_number_size.c', + 'arith/bernoulli_number_vec.c', + 'arith/bernoulli_number_vec_multi_mod.c', + 'arith/bernoulli_number_vec_recursive.c', + 'arith/bernoulli_polynomial.c', + 'arith/dedekind_cosine_sum_factored.c', + 'arith/divisors.c', + 'arith/euler_number.c', + 'arith/euler_number_size.c', + 'arith/euler_number_vec.c', + 'arith/euler_polynomial.c', + 'arith/harmonic_number.c', + 'arith/landau_function_vec.c', + 'arith/number_of_partitions.c', + 'arith/number_of_partitions_nmod_vec.c', + 'arith/number_of_partitions_vec.c', + 'arith/ramanujan_tau.c', + 'arith/stirling1.c', + 'arith/stirling2.c', + 'arith/stirlingmat.c', + 'arith/sum_of_squares.c', + 'arith/sum_of_squares_vec.c', + 'bernoulli/bound_2exp_si.c', + 'bernoulli/cache_compute.c', + 'bernoulli/fmpq_ui.c', + 'bernoulli/fmpq_ui_multi_mod.c', + 'bernoulli/fmpq_ui_zeta.c', + 'bernoulli/fmpq_vec.c', + 'bernoulli/mod_p_harvey.c', + 'bernoulli/rev_clear.c', + 'bernoulli/rev_init.c', + 'bernoulli/rev_next.c', + 'bool_mat/add.c', + 'bool_mat/all.c', + 'bool_mat/all_pairs_longest_walk.c', + 'bool_mat/any.c', + 'bool_mat/clear.c', + 'bool_mat/complement.c', + 'bool_mat/directed_cycle.c', + 'bool_mat/directed_path.c', + 'bool_mat/equal.c', + 'bool_mat/get_strongly_connected_components.c', + 'bool_mat/init.c', + 'bool_mat/io.c', + 'bool_mat/is_diagonal.c', + 'bool_mat/is_lower_triangular.c', + 'bool_mat/is_nilpotent.c', + 'bool_mat/is_transitive.c', + 'bool_mat/mul.c', + 'bool_mat/mul_entrywise.c', + 'bool_mat/nilpotency_degree.c', + 'bool_mat/one.c', + 'bool_mat/pow_ui.c', + 'bool_mat/randtest.c', + 'bool_mat/set.c', + 'bool_mat/trace.c', + 'bool_mat/transitive_closure.c', + 'bool_mat/transpose.c', + 'bool_mat/zero.c', + 'ca/abs.c', + 'ca/add.c', + 'ca/arg.c', + 'ca/asin.c', + 'ca/atan.c', + 'ca/can_evaluate_qqbar.c', + 'ca/ceil.c', + 'ca/check_equal.c', + 'ca/check_ge.c', + 'ca/check_is_algebraic.c', + 'ca/check_is_i.c', + 'ca/check_is_imaginary.c', + 'ca/check_is_infinity.c', + 'ca/check_is_integer.c', + 'ca/check_is_negative_real.c', + 'ca/check_is_neg_i.c', + 'ca/check_is_neg_i_inf.c', + 'ca/check_is_neg_inf.c', + 'ca/check_is_neg_one.c', + 'ca/check_is_number.c', + 'ca/check_is_one.c', + 'ca/check_is_pos_i_inf.c', + 'ca/check_is_pos_inf.c', + 'ca/check_is_rational.c', + 'ca/check_is_real.c', + 'ca/check_is_signed_inf.c', + 'ca/check_is_uinf.c', + 'ca/check_is_undefined.c', + 'ca/check_is_zero.c', + 'ca/clear.c', + 'ca/condense_field.c', + 'ca/conj.c', + 'ca/csgn.c', + 'ca/ctx_clear.c', + 'ca/ctx_get_field_const.c', + 'ca/ctx_get_field_fx.c', + 'ca/ctx_get_field_fxy.c', + 'ca/ctx_init.c', + 'ca/div.c', + 'ca/dot.c', + 'ca/equal_repr.c', + 'ca/erf.c', + 'ca/erfc.c', + 'ca/erfi.c', + 'ca/euler.c', + 'ca/exp.c', + 'ca_ext/cache_clear.c', + 'ca_ext/cache_init.c', + 'ca_ext/cache_insert.c', + 'ca_ext/clear.c', + 'ca_ext/cmp_repr.c', + 'ca_ext/equal_repr.c', + 'ca_ext/get_acb_raw.c', + 'ca_ext/init.c', + 'ca_ext/inlines.c', + 'ca_ext/print.c', + 'ca/factor.c', + 'ca/factor_clear.c', + 'ca/factor_get_ca.c', + 'ca/factor_init.c', + 'ca/factor_insert.c', + 'ca/factor_one.c', + 'ca_field/build_ideal.c', + 'ca_field/build_ideal_erf.c', + 'ca_field/build_ideal_gamma.c', + 'ca_field/cache_clear.c', + 'ca_field/cache_init.c', + 'ca_field/cache_insert.c', + 'ca_field/clear.c', + 'ca_field/cmp.c', + 'ca_field/init.c', + 'ca_field/print.c', + 'ca_field/set_ext.c', + 'ca/floor.c', + 'ca/fmpq_poly_evaluate.c', + 'ca/fmpz_mpoly_evaluate.c', + 'ca/fmpz_mpoly_q_evaluate.c', + 'ca/fmpz_poly_evaluate.c', + 'ca/gamma.c', + 'ca/get_acb.c', + 'ca/get_acb_raw.c', + 'ca/get_fexpr.c', + 'ca/get_qqbar.c', + 'ca/hash_repr.c', + 'ca/i.c', + 'ca/im.c', + 'ca/init.c', + 'ca/inlines.c', + 'ca/inv.c', + 'ca/io.c', + 'ca/is_cyclotomic_nf_elem.c', + 'ca/is_gen_as_ext.c', + 'calcium/func_name.c', + 'calcium/io.c', + 'calcium/write_acb.c', + 'calcium/write.c', + 'calcium/write_si.c', + 'ca/log.c', + 'ca/make_field_element.c', + 'ca_mat/add.c', + 'ca_mat/add_ca.c', + 'ca_mat/addmul_ca.c', + 'ca_mat/adjugate.c', + 'ca_mat/adjugate_charpoly.c', + 'ca_mat/adjugate_cofactor.c', + 'ca_mat/ca_poly_evaluate.c', + 'ca_mat/charpoly_berkowitz.c', + 'ca_mat/charpoly.c', + 'ca_mat/charpoly_danilevsky.c', + 'ca_mat/check_equal.c', + 'ca_mat/check_is_one.c', + 'ca_mat/check_is_zero.c', + 'ca_mat/clear.c', + 'ca_mat/companion.c', + 'ca_mat/conj.c', + 'ca_mat/conj_transpose.c', + 'ca_mat/det_bareiss.c', + 'ca_mat/det_berkowitz.c', + 'ca_mat/det.c', + 'ca_mat/det_cofactor.c', + 'ca_mat/det_lu.c', + 'ca_mat/dft.c', + 'ca_mat/diagonalization.c', + 'ca_mat/eigenvalues.c', + 'ca_mat/exp.c', + 'ca_mat/fflu.c', + 'ca_mat/find_pivot.c', + 'ca_mat/get_fexpr.c', + 'ca_mat/hilbert.c', + 'ca_mat/init.c', + 'ca_mat/inlines.c', + 'ca_mat/inv.c', + 'ca_mat/jordan_blocks.c', + 'ca_mat/jordan_form.c', + 'ca_mat/jordan_transformation.c', + 'ca_mat/log.c', + 'ca_mat/lu.c', + 'ca_mat/lu_classical.c', + 'ca_mat/lu_recursive.c', + 'ca_mat/mul.c', + 'ca_mat/mul_classical.c', + 'ca_mat/mul_same_nf.c', + 'ca_mat/neg.c', + 'ca_mat/nonsingular_fflu.c', + 'ca_mat/nonsingular_lu.c', + 'ca_mat/nonsingular_solve_adjugate.c', + 'ca_mat/nonsingular_solve.c', + 'ca_mat/nonsingular_solve_fflu.c', + 'ca_mat/nonsingular_solve_lu.c', + 'ca_mat/one.c', + 'ca_mat/ones.c', + 'ca_mat/pascal.c', + 'ca_mat/pow_ui_binexp.c', + 'ca_mat/print.c', + 'ca_mat/randops.c', + 'ca_mat/randtest.c', + 'ca_mat/rank.c', + 'ca_mat/right_kernel.c', + 'ca_mat/rref.c', + 'ca_mat/rref_fflu.c', + 'ca_mat/rref_lu.c', + 'ca_mat/set.c', + 'ca_mat/set_ca.c', + 'ca_mat/set_fmpq_mat.c', + 'ca_mat/set_fmpz_mat.c', + 'ca_mat/solve_fflu_precomp.c', + 'ca_mat/solve_lu_precomp.c', + 'ca_mat/solve_tril.c', + 'ca_mat/solve_triu.c', + 'ca_mat/stirling.c', + 'ca_mat/sub.c', + 'ca_mat/sub_ca.c', + 'ca_mat/submul_ca.c', + 'ca_mat/trace.c', + 'ca_mat/transfer.c', + 'ca_mat/transpose.c', + 'ca_mat/window_init.c', + 'ca_mat/zero.c', + 'ca/merge_fields.c', + 'ca/mul.c', + 'ca/neg.c', + 'ca/neg_i.c', + 'ca/neg_i_inf.c', + 'ca/neg_inf.c', + 'ca/neg_one.c', + 'ca/one.c', + 'ca/pi.c', + 'ca/pi_i.c', + 'ca_poly/add.c', + 'ca_poly/check_equal.c', + 'ca_poly/check_is_one.c', + 'ca_poly/check_is_zero.c', + 'ca_poly/clear.c', + 'ca_poly/compose.c', + 'ca_poly/derivative.c', + 'ca_poly/divrem_basecase.c', + 'ca_poly/divrem.c', + 'ca_poly/div_series.c', + 'ca_poly/evaluate.c', + 'ca_poly/evaluate_horner.c', + 'ca_poly/exp_series.c', + 'ca_poly/factor_squarefree.c', + 'ca_poly/fit_length.c', + 'ca_poly/gcd.c', + 'ca_poly/gcd_euclidean.c', + 'ca_poly/get_fexpr.c', + 'ca_poly/init.c', + 'ca_poly/inlines.c', + 'ca_poly/integral.c', + 'ca_poly/inv_series.c', + 'ca_poly/is_proper.c', + 'ca_poly/log_series.c', + 'ca_poly/make_monic.c', + 'ca_poly/mul.c', + 'ca_poly/mullow.c', + 'ca_poly/mullow_same_nf.c', + 'ca_poly/neg.c', + 'ca_poly/normalise.c', + 'ca_poly/pow_ui.c', + 'ca_poly/pow_ui_trunc.c', + 'ca_poly/print.c', + 'ca_poly/randtest.c', + 'ca_poly/reverse.c', + 'ca_poly/roots.c', + 'ca_poly/set.c', + 'ca_poly/set_ca.c', + 'ca_poly/set_coeff_ca.c', + 'ca_poly/set_fmpq_poly.c', + 'ca_poly/set_fmpz_poly.c', + 'ca_poly/set_length.c', + 'ca_poly/set_roots.c', + 'ca_poly/set_si.c', + 'ca_poly/shift_left.c', + 'ca_poly/shift_right.c', + 'ca_poly/squarefree_part.c', + 'ca_poly/sub.c', + 'ca_poly/transfer.c', + 'ca_poly/vec_append.c', + 'ca_poly/vec_clear.c', + 'ca_poly/vec_init.c', + 'ca_poly/vec_set_length.c', + 'ca/pos_i_inf.c', + 'ca/pos_inf.c', + 'ca/pow.c', + 'ca/randtest.c', + 'ca/re.c', + 'ca/rewrite_complex_normal_form.c', + 'ca/set.c', + 'ca/set_d.c', + 'ca/set_d_d.c', + 'ca/set_fexpr.c', + 'ca/set_fmpq.c', + 'ca/set_fmpz.c', + 'ca/set_qqbar.c', + 'ca/set_si.c', + 'ca/set_ui.c', + 'ca/sgn.c', + 'ca/sin_cos.c', + 'ca/sqrt.c', + 'ca/sqrt_factor.c', + 'ca/swap.c', + 'ca/transfer.c', + 'ca/uinf.c', + 'ca/undefined.c', + 'ca/unknown.c', + 'ca_vec/ca_vec.c', + 'ca_vec/inlines.c', + 'ca/zero.c', + 'dirichlet/char.c', + 'dirichlet/char_conductor.c', + 'dirichlet/char_eq_deep.c', + 'dirichlet/char_exp.c', + 'dirichlet/char_first_primitive.c', + 'dirichlet/char_index.c', + 'dirichlet/char_lift.c', + 'dirichlet/char_log.c', + 'dirichlet/char_lower.c', + 'dirichlet/char_mul.c', + 'dirichlet/char_next.c', + 'dirichlet/char_next_primitive.c', + 'dirichlet/char_one.c', + 'dirichlet/char_order.c', + 'dirichlet/char_parity.c', + 'dirichlet/char_pow.c', + 'dirichlet/char_print.c', + 'dirichlet/chi.c', + 'dirichlet/chi_vec.c', + 'dirichlet/chi_vec_loop.c', + 'dirichlet/chi_vec_primeloop.c', + 'dirichlet/group_clear.c', + 'dirichlet/group_dlog_precompute.c', + 'dirichlet/group_init.c', + 'dirichlet/group_num_primitive.c', + 'dirichlet/index_char.c', + 'dirichlet/inlines.c', + 'dirichlet/pairing.c', + 'dirichlet/pairing_char.c', + 'dirichlet/ui_conductor.c', + 'dirichlet/ui_order.c', + 'dirichlet/ui_parity.c', + 'dirichlet/ui_vec_set_null.c', + 'dlog/1modpe.c', + 'dlog/1modpe_init.c', + 'dlog/1modpe_mod1p.c', + 'dlog/bsgs.c', + 'dlog/bsgs_init.c', + 'dlog/crt.c', + 'dlog/crt_clear.c', + 'dlog/crt_init.c', + 'dlog/factor_group.c', + 'dlog/mod2e.c', + 'dlog/modpe.c', + 'dlog/modpe_init.c', + 'dlog/once.c', + 'dlog/order23.c', + 'dlog/order23_init.c', + 'dlog/power.c', + 'dlog/power_init.c', + 'dlog/precomp.c', + 'dlog/precomp_clear.c', + 'dlog/precomp_modpe_init.c', + 'dlog/precomp_n_init.c', + 'dlog/precomp_pe_init.c', + 'dlog/precomp_p_init.c', + 'dlog/precomp_small_init.c', + 'dlog/rho.c', + 'dlog/rho_init.c', + 'dlog/table.c', + 'dlog/table_init.c', + 'dlog/vec_add.c', + 'dlog/vec_add_precomp.c', + 'dlog/vec.c', + 'dlog/vec_eratos_add.c', + 'dlog/vec_eratos.c', + 'dlog/vec_fill.c', + 'dlog/vec_loop_add.c', + 'dlog/vec_loop.c', + 'dlog/vec_pindex_factorgcd.c', + 'dlog/vec_set_not_found.c', + 'dlog/vec_sieve_add.c', + 'dlog/vec_sieve_add_precomp.c', + 'dlog/vec_sieve.c', + 'dlog/vec_sieve_precomp.c', + 'd_mat/approx_equal.c', + 'd_mat/clear.c', + 'd_mat/equal.c', + 'd_mat/init.c', + 'd_mat/inlines.c', + 'd_mat/mul_classical.c', + 'd_mat/print.c', + 'd_mat/randtest.c', + 'd_mat/set.c', + 'd_mat/transpose.c', + 'd_mat/zero.c', + 'double_extras/inlines.c', + 'double_extras/lambertw.c', + 'double_extras/log2.c', + 'double_extras/randtest.c', + 'double_extras/randtest_signed.c', + 'double_extras/randtest_special.c', + 'double_interval/arb_get_di.c', + 'double_interval/arb_set_di.c', + 'double_interval/fast_div.c', + 'double_interval/fast_log_nonnegative.c', + 'double_interval/fast_mul.c', + 'double_interval/fast_sqr.c', + 'double_interval/inlines.c', + 'd_vec/add.c', + 'd_vec/approx_equal.c', + 'd_vec/clear.c', + 'd_vec/dot.c', + 'd_vec/dot_heuristic.c', + 'd_vec/dot_thrice.c', + 'd_vec/equal.c', + 'd_vec/init.c', + 'd_vec/inlines.c', + 'd_vec/is_approx_zero.c', + 'd_vec/is_zero.c', + 'd_vec/norm.c', + 'd_vec/randtest.c', + 'd_vec/set.c', + 'd_vec/sub.c', + 'd_vec/zero.c', + 'fexpr/arg.c', + 'fexpr/arithmetic.c', + 'fexpr/arithmetic_nodes.c', + 'fexpr_builtin/inlines.c', + 'fexpr_builtin/lookup.c', + 'fexpr_builtin/table.c', + 'fexpr/call0.c', + 'fexpr/call1.c', + 'fexpr/call2.c', + 'fexpr/call3.c', + 'fexpr/call4.c', + 'fexpr/call_vec.c', + 'fexpr/cmp_fast.c', + 'fexpr/contains.c', + 'fexpr/depth.c', + 'fexpr/equal_si.c', + 'fexpr/equal_ui.c', + 'fexpr/expanded_normal_form.c', + 'fexpr/func.c', + 'fexpr/get_fmpz.c', + 'fexpr/get_fmpz_mpoly_q.c', + 'fexpr/get_string.c', + 'fexpr/get_symbol_str.c', + 'fexpr/hash.c', + 'fexpr/inlines.c', + 'fexpr/is_any_builtin_call.c', + 'fexpr/is_arithmetic_operation.c', + 'fexpr/is_builtin_call.c', + 'fexpr/is_neg_integer.c', + 'fexpr/numerical_enclosure.c', + 'fexpr/num_leaves.c', + 'fexpr/print.c', + 'fexpr/replace.c', + 'fexpr/set_arf.c', + 'fexpr/set_d.c', + 'fexpr/set_fmpq.c', + 'fexpr/set_fmpz.c', + 'fexpr/set_fmpz_mpoly.c', + 'fexpr/set_fmpz_mpoly_q.c', + 'fexpr/set_si.c', + 'fexpr/set_string.c', + 'fexpr/set_symbol_str.c', + 'fexpr/set_ui.c', + 'fexpr/vec_sort_fast.c', + 'fexpr/write_latex.c', + 'fft/adjust.c', + 'fft/adjust_sqrt2.c', + 'fft/butterfly_lshB.c', + 'fft/butterfly_rshB.c', + 'fft/combine_bits.c', + 'fft/convolution.c', + 'fft/convolution_precache.c', + 'fft/div_2expmod_2expp1.c', + 'fft/fermat_to_mpz.c', + 'fft/fft_mfa_truncate_sqrt2.c', + 'fft/fft_mfa_truncate_sqrt2_inner.c', + 'fft/fft_negacylic.c', + 'fft/fft_radix2.c', + 'fft/fft_truncate.c', + 'fft/fft_truncate_sqrt2.c', + 'fft/ifft_mfa_truncate_sqrt2.c', + 'fft/ifft_negacyclic.c', + 'fft/ifft_radix2.c', + 'fft/ifft_truncate.c', + 'fft/ifft_truncate_sqrt2.c', + 'fft/inlines.c', + 'fft/mul_2expmod_2expp1.c', + 'fft/mul_fft_main.c', + 'fft/mul_mfa_truncate_sqrt2.c', + 'fft/mulmod_2expp1.c', + 'fft/mul_truncate_sqrt2.c', + 'fft/negmod_2expp1.c', + 'fft/normmod_2expp1.c', + #'fft_small/default_ctx.c', + #'fft_small/fmpz_poly_mul.c', + #'fft_small/mpn_helpers.c', + #'fft_small/mpn_mul.c', + #'fft_small/mulmod_statisfies_bounds.c', + #'fft_small/nmod_poly_mul.c', + #'fft_small/sd_fft.c', + #'fft_small/sd_fft_ctx.c', + #'fft_small/sd_ifft.c', + 'fft/split_bits.c', + 'fmpq/add.c', + 'fmpq/addmul.c', + 'fmpq/ball.c', + 'fmpq/canonicalise.c', + 'fmpq/cfrac_bound.c', + 'fmpq/clear_readonly.c', + 'fmpq/cmp.c', + 'fmpq/dedekind_sum.c', + 'fmpq/div_2exp.c', + 'fmpq/div.c', + 'fmpq/farey_neighbors.c', + 'fmpq/fmpz_vector.c', + 'fmpq/gcd.c', + 'fmpq/gcd_cofactors.c', + 'fmpq/get_cfrac.c', + 'fmpq/get_cfrac_helpers.c', + 'fmpq/get_d.c', + 'fmpq/get_mpfr.c', + 'fmpq/get_mpz_frac.c', + 'fmpq/get_str.c', + 'fmpq/harmonic_ui.c', + 'fmpq/height_bits.c', + 'fmpq/height.c', + 'fmpq/init_set_readonly.c', + 'fmpq/inlines.c', + 'fmpq/inv.c', + 'fmpq/io.c', + 'fmpq/is_canonical.c', + 'fmpq/mat22.c', + 'fmpq_mat/add.c', + 'fmpq_mat/can_solve.c', + 'fmpq_mat/can_solve_dixon.c', + 'fmpq_mat/can_solve_fraction_free.c', + 'fmpq_mat/can_solve_multi_mod.c', + 'fmpq_mat/charpoly.c', + 'fmpq_mat/clear.c', + 'fmpq_mat/concat_horizontal.c', + 'fmpq_mat/concat_vertical.c', + 'fmpq_mat/det.c', + 'fmpq_mat/equal.c', + 'fmpq_mat/fmpq_vec_mul.c', + 'fmpq_mat/fmpz_vec_mul.c', + 'fmpq_mat/get_fmpz_mat.c', + 'fmpq_mat/get_fmpz_mat_colwise.c', + 'fmpq_mat/get_fmpz_mat_entrywise.c', + 'fmpq_mat/get_fmpz_mat_matwise.c', + 'fmpq_mat/get_fmpz_mat_mod_fmpz.c', + 'fmpq_mat/get_fmpz_mat_rowwise.c', + 'fmpq_mat/gso.c', + 'fmpq_mat/hilbert_matrix.c', + 'fmpq_mat/init.c', + 'fmpq_mat/init_set.c', + 'fmpq_mat/inlines.c', + 'fmpq_mat/inv.c', + 'fmpq_mat/invert.c', + 'fmpq_mat/io.c', + 'fmpq_mat/is_integral.c', + 'fmpq_mat/is_one.c', + 'fmpq_mat/is_zero.c', + 'fmpq_mat/kronecker_product.c', + 'fmpq_mat/minpoly.c', + 'fmpq_mat/mul.c', + 'fmpq_mat/mul_cleared.c', + 'fmpq_mat/mul_direct.c', + 'fmpq_mat/mul_fmpq_vec.c', + 'fmpq_mat/mul_fmpz_mat.c', + 'fmpq_mat/mul_fmpz_vec.c', + 'fmpq_mat/mul_r_fmpz_mat.c', + 'fmpq_mat/neg.c', + 'fmpq_mat/one.c', + 'fmpq_mat/pivot.c', + 'fmpq_mat/randbits.c', + 'fmpq_mat/randtest.c', + 'fmpq_mat/rref.c', + 'fmpq_mat/rref_classical.c', + 'fmpq_mat/rref_fraction_free.c', + 'fmpq_mat/scalar_div_fmpz.c', + 'fmpq_mat/scalar_mul_fmpq.c', + 'fmpq_mat/scalar_mul_fmpz.c', + 'fmpq_mat/set.c', + 'fmpq_mat/set_fmpz_mat.c', + 'fmpq_mat/set_fmpz_mat_div_fmpz.c', + 'fmpq_mat/set_fmpz_mat_mod_fmpz.c', + 'fmpq_mat/similarity.c', + 'fmpq_mat/solve.c', + 'fmpq_mat/solve_dixon.c', + 'fmpq_mat/solve_fraction_free.c', + 'fmpq_mat/solve_multi_mod.c', + 'fmpq_mat/sub.c', + 'fmpq_mat/swap.c', + 'fmpq_mat/trace.c', + 'fmpq_mat/transpose.c', + 'fmpq_mat/window_clear.c', + 'fmpq_mat/window_init.c', + 'fmpq_mat/zero.c', + 'fmpq/mod_fmpz.c', + 'fmpq_mpoly/add.c', + 'fmpq_mpoly/add_fmpq.c', + 'fmpq_mpoly/cmp.c', + 'fmpq_mpoly/compose_fmpq_mpoly.c', + 'fmpq_mpoly/compose_fmpq_mpoly_gen.c', + 'fmpq_mpoly/compose_fmpq_poly.c', + 'fmpq_mpoly/content_vars.c', + 'fmpq_mpoly/degrees.c', + 'fmpq_mpoly/derivative.c', + 'fmpq_mpoly/discriminant.c', + 'fmpq_mpoly/div.c', + 'fmpq_mpoly/divides.c', + 'fmpq_mpoly/divrem.c', + 'fmpq_mpoly/divrem_ideal.c', + 'fmpq_mpoly/equal_fmpq.c', + 'fmpq_mpoly/equal_fmpz.c', + 'fmpq_mpoly/evaluate_all.c', + 'fmpq_mpoly/evaluate_one.c', + 'fmpq_mpoly_factor/clear.c', + 'fmpq_mpoly_factor/expand.c', + 'fmpq_mpoly_factor/factor.c', + 'fmpq_mpoly_factor/factor_make_integral.c', + 'fmpq_mpoly_factor/factor_make_monic.c', + 'fmpq_mpoly_factor/factor_squarefree.c', + 'fmpq_mpoly_factor/fit_length.c', + 'fmpq_mpoly_factor/init.c', + 'fmpq_mpoly_factor/inlines.c', + 'fmpq_mpoly_factor/realloc.c', + 'fmpq_mpoly_factor/sort.c', + 'fmpq_mpoly_factor/swap_fmpz_mpoly_factor.c', + 'fmpq_mpoly/gcd.c', + 'fmpq_mpoly/gcd_cofactors.c', + 'fmpq_mpoly/get_coeff_fmpq_fmpz.c', + 'fmpq_mpoly/get_coeff_fmpq_monomial.c', + 'fmpq_mpoly/get_coeff_fmpq_ui.c', + 'fmpq_mpoly/get_coeff_vars_ui.c', + 'fmpq_mpoly/get_fmpq.c', + 'fmpq_mpoly/get_set_is_fmpq_poly.c', + 'fmpq_mpoly/get_str_pretty.c', + 'fmpq_mpoly/get_term.c', + 'fmpq_mpoly/get_term_coeff_fmpq.c', + 'fmpq_mpoly/get_term_exp_fmpz.c', + 'fmpq_mpoly/get_term_exp_si.c', + 'fmpq_mpoly/get_term_exp_ui.c', + 'fmpq_mpoly/get_term_monomial.c', + 'fmpq_mpoly/get_term_var_exp_si.c', + 'fmpq_mpoly/get_term_var_exp_ui.c', + 'fmpq_mpoly/inflate.c', + 'fmpq_mpoly/inlines.c', + 'fmpq_mpoly/integral.c', + 'fmpq_mpoly/io.c', + 'fmpq_mpoly/is_canonical.c', + 'fmpq_mpoly/is_monic.c', + 'fmpq_mpoly/make_monic.c', + 'fmpq_mpoly/mul.c', + 'fmpq_mpoly/pow_fmpz.c', + 'fmpq_mpoly/pow_ui.c', + 'fmpq_mpoly/push_term_fmpq_fmpz.c', + 'fmpq_mpoly/push_term_fmpq_ui.c', + 'fmpq_mpoly/reduce.c', + 'fmpq_mpoly/reduce_easy.c', + 'fmpq_mpoly/repack_bits.c', + 'fmpq_mpoly/rescale.c', + 'fmpq_mpoly/resultant.c', + 'fmpq_mpoly/scalar_div_fmpq.c', + 'fmpq_mpoly/scalar_div_fmpz.c', + 'fmpq_mpoly/scalar_mul_fmpq.c', + 'fmpq_mpoly/scalar_mul_fmpz.c', + 'fmpq_mpoly/set_coeff_fmpq_fmpz.c', + 'fmpq_mpoly/set_coeff_fmpq_monomial.c', + 'fmpq_mpoly/set_coeff_fmpq_ui.c', + 'fmpq_mpoly/set_fmpq.c', + 'fmpq_mpoly/set_fmpz.c', + 'fmpq_mpoly/set_str_pretty.c', + 'fmpq_mpoly/set_term_coeff_fmpq.c', + 'fmpq_mpoly/sqrt.c', + 'fmpq_mpoly/sub.c', + 'fmpq_mpoly/sub_fmpq.c', + 'fmpq_mpoly/term_content.c', + 'fmpq_mpoly/term_exp_fits.c', + 'fmpq_mpoly/univar.c', + 'fmpq_mpoly/void_ring.c', + 'fmpq/mpq_clear_readonly.c', + 'fmpq/mpq_init_set_readonly.c', + 'fmpq/mul_2exp.c', + 'fmpq/mul.c', + 'fmpq/next_calkin_wilf.c', + 'fmpq/next_minimal.c', + 'fmpq/next_signed_calkin_wilf.c', + 'fmpq/next_signed_minimal.c', + 'fmpq_poly/add.c', + 'fmpq_poly/add_series.c', + 'fmpq_poly/asinh_series.c', + 'fmpq_poly/asin_series.c', + 'fmpq_poly/atanh_series.c', + 'fmpq_poly/atan_series.c', + 'fmpq_poly/canonicalise.c', + 'fmpq_poly/clear.c', + 'fmpq_poly/cmp.c', + 'fmpq_poly/comparisons.c', + 'fmpq_poly/compose.c', + 'fmpq_poly/compose_series_brent_kung.c', + 'fmpq_poly/compose_series.c', + 'fmpq_poly/compose_series_horner.c', + 'fmpq_poly/content.c', + 'fmpq_poly/cosh_series.c', + 'fmpq_poly/cos_series.c', + 'fmpq_poly/derivative.c', + 'fmpq_poly/div.c', + 'fmpq_poly/divides.c', + 'fmpq_poly/divrem.c', + 'fmpq_poly/div_series.c', + 'fmpq_poly/equal.c', + 'fmpq_poly/equal_trunc.c', + 'fmpq_poly/evaluate.c', + 'fmpq_poly/exp_series.c', + 'fmpq_poly/fit_length.c', + 'fmpq_poly/gcd.c', + 'fmpq_poly/gegenbauer_c.c', + 'fmpq_poly/get_coeff.c', + 'fmpq_poly/get_nmod_poly.c', + 'fmpq_poly/get_numerator_denominator.c', + 'fmpq_poly/get_slice.c', + 'fmpq_poly/get_str.c', + 'fmpq_poly/init.c', + 'fmpq_poly/inlines.c', + 'fmpq_poly/integral.c', + 'fmpq_poly/interpolate_fmpz_vec.c', + 'fmpq_poly/inv.c', + 'fmpq_poly/inv_series_newton.c', + 'fmpq_poly/invsqrt_series.c', + 'fmpq_poly/io.c', + 'fmpq_poly/is_canonical.c', + 'fmpq_poly/is_monic.c', + 'fmpq_poly/is_squarefree.c', + 'fmpq_poly/laguerre_l.c', + 'fmpq_poly/lcm.c', + 'fmpq_poly/legendre_p.c', + 'fmpq_poly/log_series.c', + 'fmpq_poly/make_monic.c', + 'fmpq_poly/mul.c', + 'fmpq_poly/mullow.c', + 'fmpq_poly/neg.c', + 'fmpq_poly/normalise.c', + 'fmpq_poly/nth_derivative.c', + 'fmpq_poly/one.c', + 'fmpq_poly/pow.c', + 'fmpq_poly/powers_clear.c', + 'fmpq_poly/powers_precompute.c', + 'fmpq_poly/power_sums.c', + 'fmpq_poly/power_sums_to_poly.c', + 'fmpq_poly/pow_trunc.c', + 'fmpq_poly/primitive_part.c', + 'fmpq_poly/randtest.c', + 'fmpq_poly/realloc.c', + 'fmpq_poly/rem.c', + 'fmpq_poly/remove.c', + 'fmpq_poly/rem_powers_precomp.c', + 'fmpq_poly/rescale.c', + 'fmpq_poly/resultant.c', + 'fmpq_poly/resultant_modular_div.c', + 'fmpq_poly/reverse.c', + 'fmpq_poly/revert_series.c', + 'fmpq_poly/revert_series_lagrange.c', + 'fmpq_poly/revert_series_lagrange_fast.c', + 'fmpq_poly/revert_series_newton.c', + 'fmpq_poly/scalar.c', + 'fmpq_poly/set.c', + 'fmpq_poly/set_coeff.c', + 'fmpq_poly/set_length.c', + 'fmpq_poly/set_str.c', + 'fmpq_poly/set_trunc.c', + 'fmpq_poly/shift_left.c', + 'fmpq_poly/shift_right.c', + 'fmpq_poly/sin_cos_series.c', + 'fmpq_poly/sinh_cosh_series.c', + 'fmpq_poly/sinh_series.c', + 'fmpq_poly/sin_series.c', + 'fmpq_poly/sqrt_series.c', + 'fmpq_poly/sub.c', + 'fmpq_poly/sub_series.c', + 'fmpq_poly/swap.c', + 'fmpq_poly/tanh_series.c', + 'fmpq_poly/tan_series.c', + 'fmpq_poly/truncate.c', + 'fmpq_poly/xgcd.c', + 'fmpq_poly/zero.c', + 'fmpq/pow_fmpz.c', + 'fmpq/pow_si.c', + 'fmpq/randbits.c', + 'fmpq/randtest.c', + 'fmpq/reconstruct_fmpz_2.c', + 'fmpq/reconstruct_fmpz_2_naive.c', + 'fmpq/reconstruct_fmpz.c', + 'fmpq/set_cfrac.c', + 'fmpq/set_fmpz_frac.c', + 'fmpq/set_si.c', + 'fmpq/set_str.c', + 'fmpq/set_ui.c', + 'fmpq/simplest_between.c', + 'fmpq/sub.c', + 'fmpq/submul.c', + 'fmpq_vec/clear.c', + 'fmpq_vec/dot.c', + 'fmpq_vec/get_fmpz_vec_fmpz.c', + 'fmpq_vec/init.c', + 'fmpq_vec/io.c', + 'fmpq_vec/randtest.c', + 'fmpq_vec/randtest_uniq_sorted.c', + 'fmpq_vec/set_fmpz_vec.c', + 'fmpq_vec/sort.c', + 'fmpz/abs.c', + 'fmpz/abs_fits_ui.c', + 'fmpz/abs_lbound_ui_2exp.c', + 'fmpz/abs_ubound_ui_2exp.c', + 'fmpz/add.c', + 'fmpz/addmul.c', + 'fmpz/aors_ui.c', + 'fmpz/bin_uiui.c', + 'fmpz/bit_pack.c', + 'fmpz/bits.c', + 'fmpz/bit_unpack.c', + 'fmpz/cdiv.c', + 'fmpz/clear_readonly.c', + 'fmpz/clog.c', + 'fmpz/cmp.c', + 'fmpz/comb_clear.c', + 'fmpz/comb_init.c', + 'fmpz/CRT.c', + 'fmpz/divexact.c', + 'fmpz/divides.c', + 'fmpz/divides_mod_list.c', + 'fmpz/divisible.c', + 'fmpz/divisor_in_residue_class_lenstra.c', + 'fmpz/divisor_sigma.c', + 'fmpz/div_newton.c', + 'fmpz/dlog.c', + 'fmpz/equal.c', + 'fmpz/euler_phi.c', + 'fmpz_extras/lshift_mpn.c', + 'fmpz_extras/sub_small_large.c', + 'fmpz_factor/append.c', + 'fmpz_factor/clear.c', + 'fmpz_factor/concat.c', + 'fmpz_factor/ecm_add.c', + 'fmpz_factor/ecm_addmod.c', + 'fmpz_factor/ecm.c', + 'fmpz_factor/ecm_clear.c', + 'fmpz_factor/ecm_double.c', + 'fmpz_factor/ecm_init.c', + 'fmpz_factor/ecm_mul_montgomery_ladder.c', + 'fmpz_factor/ecm_select_curve.c', + 'fmpz_factor/ecm_stage_I.c', + 'fmpz_factor/ecm_stage_II.c', + 'fmpz_factor/ecm_submod.c', + 'fmpz_factor/expand.c', + 'fmpz_factor/expand_iterative.c', + 'fmpz_factor/expand_multiexp.c', + 'fmpz_factor/extend_factor_ui.c', + 'fmpz_factor/factor.c', + 'fmpz_factor/factor_no_trial.c', + 'fmpz_factor/factor_pp1.c', + 'fmpz_factor/factor_si.c', + 'fmpz_factor/factor_smooth.c', + 'fmpz_factor/factor_trial.c', + 'fmpz_factor/factor_trial_range.c', + 'fmpz_factor/fit_length.c', + 'fmpz_factor/get_fmpz.c', + 'fmpz_factor/init.c', + 'fmpz_factor/io.c', + 'fmpz_factor/pollard_brent.c', + 'fmpz_factor/pollard_brent_single.c', + 'fmpz_factor/refine.c', + 'fmpz_factor/set_length.c', + 'fmpz/fac_ui.c', + 'fmpz/fdiv.c', + 'fmpz/fib_ui.c', + 'fmpz/fits_si.c', + 'fmpz/flog.c', + 'fmpz/fmma.c', + 'fmpz/fmms.c', + 'fmpz/gcd.c', + 'fmpz/gcdinv.c', + 'fmpz/get.c', + 'fmpz/get_str.c', + 'fmpzi/bits.c', + 'fmpzi/canonical_unit_i_pow.c', + 'fmpzi/divexact.c', + 'fmpzi/div_i.c', + 'fmpzi/divrem_approx.c', + 'fmpzi/divrem.c', + 'fmpzi/gcd_binary.c', + 'fmpzi/gcd.c', + 'fmpzi/gcd_euclidean.c', + 'fmpzi/gcd_euclidean_improved.c', + 'fmpzi/gcd_shortest.c', + 'fmpzi/inlines.c', + 'fmpzi/io.c', + 'fmpzi/is_prime.c', + 'fmpzi/is_probabprime.c', + 'fmpzi/mul.c', + 'fmpzi/mul_i.c', + 'fmpzi/mul_i_pow_si.c', + 'fmpz/init2.c', + 'fmpz/init_set_readonly.c', + 'fmpz/inlines.c', + 'fmpz/invmod.c', + 'fmpz/io.c', + 'fmpzi/pow_ui.c', + 'fmpzi/remove_one_plus_i.c', + 'fmpz/is_canonical.c', + 'fmpz/is_perfect_power.c', + 'fmpz/is_prime.c', + 'fmpz/is_prime_morrison.c', + 'fmpz/is_prime_pocklington.c', + 'fmpz/is_prime_pseudosquare.c', + 'fmpz/is_probabprime_BPSW.c', + 'fmpz/is_probabprime_lucas.c', + 'fmpzi/sqr.c', + 'fmpz/is_square.c', + 'fmpz/is_strong_probabprime.c', + 'fmpz/jacobi.c', + 'fmpz/kronecker.c', + 'fmpz/lcm.c', + 'fmpz_lll/advance_check_babai.c', + 'fmpz_lll/advance_check_babai_heuristic_d.c', + 'fmpz_lll/babai.c', + 'fmpz_lll/check_babai.c', + 'fmpz_lll/check_babai_heuristic.c', + 'fmpz_lll/check_babai_heuristic_d.c', + 'fmpz_lll/context_init.c', + 'fmpz_lll/context_init_default.c', + 'fmpz_lll/d_lll.c', + 'fmpz_lll/heuristic_dot.c', + 'fmpz_lll/is_reduced.c', + 'fmpz_lll/is_reduced_d.c', + 'fmpz_lll/is_reduced_d_with_removal.c', + 'fmpz_lll/is_reduced_mpfr.c', + 'fmpz_lll/is_reduced_mpfr_with_removal.c', + 'fmpz_lll/is_reduced_with_removal.c', + 'fmpz_lll/lll.c', + 'fmpz_lll/lll_d.c', + 'fmpz_lll/lll_d_heuristic.c', + 'fmpz_lll/lll_d_heuristic_with_removal.c', + 'fmpz_lll/lll_d_with_removal.c', + 'fmpz_lll/lll_d_with_removal_knapsack.c', + 'fmpz_lll/lll_mpf2.c', + 'fmpz_lll/lll_mpf2_with_removal.c', + 'fmpz_lll/lll_mpf.c', + 'fmpz_lll/lll_mpf_with_removal.c', + 'fmpz_lll/lll_with_removal.c', + 'fmpz_lll/lll_with_removal_ulll.c', + 'fmpz_lll/mpf2_lll.c', + 'fmpz_lll/mpf-impl.c', + 'fmpz_lll/randtest.c', + 'fmpz_lll/shift.c', + 'fmpz_lll/storjohann_ulll.c', + 'fmpz_lll/wrapper.c', + 'fmpz_lll/wrapper_with_removal.c', + 'fmpz_lll/wrapper_with_removal_knapsack.c', + 'fmpz/logic.c', + 'fmpz/lucas_chain.c', + 'fmpz_mat/add.c', + 'fmpz_mat/can_solve.c', + 'fmpz_mat/can_solve_fflu.c', + 'fmpz_mat/can_solve_multi_mod_den.c', + 'fmpz_mat/charpoly.c', + 'fmpz_mat/chol_d.c', + 'fmpz_mat/clear.c', + 'fmpz_mat/col_partition.c', + 'fmpz_mat/concat.c', + 'fmpz_mat/content.c', + 'fmpz_mat/CRT_ui.c', + 'fmpz_mat/det_bareiss.c', + 'fmpz_mat/det_bound.c', + 'fmpz_mat/det.c', + 'fmpz_mat/det_cofactor.c', + 'fmpz_mat/det_divisor.c', + 'fmpz_mat/det_modular_accelerated.c', + 'fmpz_mat/det_modular.c', + 'fmpz_mat/det_modular_given_divisor.c', + 'fmpz_mat/equal.c', + 'fmpz_mat/fflu.c', + 'fmpz_mat/find_pivot_any.c', + 'fmpz_mat/find_pivot_smallest.c', + 'fmpz_mat/fmpz_vec_mul.c', + 'fmpz_mat/get.c', + 'fmpz_mat/gram.c', + 'fmpz_mat/hadamard.c', + 'fmpz_mat/hnf.c', + 'fmpz_mat/hnf_classical.c', + 'fmpz_mat/hnf_minors.c', + 'fmpz_mat/hnf_minors_transform.c', + 'fmpz_mat/hnf_modular.c', + 'fmpz_mat/hnf_modular_eldiv.c', + 'fmpz_mat/hnf_pernet_stein.c', + 'fmpz_mat/hnf_transform.c', + 'fmpz_mat/hnf_xgcd.c', + 'fmpz_mat/howell_form_mod.c', + 'fmpz_mat/init.c', + 'fmpz_mat/inlines.c', + 'fmpz_mat/inv.c', + 'fmpz_mat/invert.c', + 'fmpz_mat/io.c', + 'fmpz_mat/is_hadamard.c', + 'fmpz_mat/is_in_hnf.c', + 'fmpz_mat/is_in_rref_with_rank.c', + 'fmpz_mat/is_in_snf.c', + 'fmpz_mat/is_one.c', + 'fmpz_mat/is_reduced.c', + 'fmpz_mat/is_reduced_gram.c', + 'fmpz_mat/is_reduced_gram_with_removal.c', + 'fmpz_mat/is_reduced_with_removal.c', + 'fmpz_mat/is_spd.c', + 'fmpz_mat/is_zero.c', + 'fmpz_mat/kronecker_product.c', + 'fmpz_mat/lll_original.c', + 'fmpz_mat/lll_storjohann.c', + 'fmpz_mat/max_bits.c', + 'fmpz_mat/minpoly_modular.c', + 'fmpz_mat/mul_blas.c', + 'fmpz_mat/mul.c', + 'fmpz_mat/mul_classical.c', + 'fmpz_mat/mul_double_word.c', + 'fmpz_mat/mul_fft.c', + 'fmpz_mat/mul_fmpz_vec.c', + 'fmpz_mat/mul_multi_mod.c', + 'fmpz_mat/mul_small.c', + 'fmpz_mat/mul_strassen.c', + 'fmpz_mat/multi_CRT_ui.c', + 'fmpz_mat/multi_mod_ui.c', + 'fmpz_mat/mul_waksman.c', + 'fmpz_mat/neg.c', + 'fmpz_mat/next_col_van_hoeij.c', + 'fmpz_mat/nullspace.c', + 'fmpz_mat/one.c', + 'fmpz_mat/pow.c', + 'fmpz_mat/randajtai.c', + 'fmpz_mat/randbits.c', + 'fmpz_mat/randdet.c', + 'fmpz_mat/randintrel.c', + 'fmpz_mat/randntrulike2.c', + 'fmpz_mat/randntrulike.c', + 'fmpz_mat/randops.c', + 'fmpz_mat/randpermdiag.c', + 'fmpz_mat/randrank.c', + 'fmpz_mat/randsimdioph.c', + 'fmpz_mat/randtest.c', + 'fmpz_mat/randtest_unsigned.c', + 'fmpz_mat/rank.c', + 'fmpz_mat/rank_small_inplace.c', + 'fmpz_mat/rref.c', + 'fmpz_mat/rref_fflu.c', + 'fmpz_mat/rref_mul.c', + 'fmpz_mat/scalar.c', + 'fmpz_mat/set.c', + 'fmpz_mat/similarity.c', + 'fmpz_mat/snf.c', + 'fmpz_mat/snf_diagonal.c', + 'fmpz_mat/snf_iliopoulos.c', + 'fmpz_mat/snf_kannan_bachem.c', + 'fmpz_mat/solve_bound.c', + 'fmpz_mat/solve.c', + 'fmpz_mat/solve_cramer.c', + 'fmpz_mat/solve_dixon.c', + 'fmpz_mat/solve_dixon_den.c', + 'fmpz_mat/solve_fflu.c', + 'fmpz_mat/solve_fflu_precomp.c', + 'fmpz_mat/solve_multi_mod_den.c', + 'fmpz_mat/sqr_bodrato.c', + 'fmpz_mat/sqr.c', + 'fmpz_mat/strong_echelon_form_mod.c', + 'fmpz_mat/sub.c', + 'fmpz_mat/swap.c', + 'fmpz_mat/trace.c', + 'fmpz_mat/transpose.c', + 'fmpz_mat/window.c', + 'fmpz_mat/zero.c', + 'fmpz_mod/add.c', + 'fmpz_mod/addmul.c', + 'fmpz/mod.c', + 'fmpz_mod/ctx.c', + 'fmpz_mod/discrete_log_pohlig_hellman.c', + 'fmpz_mod/divides.c', + 'fmpz_mod/equal_fmpz.c', + 'fmpz_mod/inlines.c', + 'fmpz_mod/inv.c', + 'fmpz_mod/is_canonical.c', + 'fmpz_mod/is_invertible.c', + 'fmpz_mod/is_one.c', + 'fmpz_mod_mat/add.c', + 'fmpz_mod_mat/can_solve.c', + 'fmpz_mod_mat/charpoly_berkowitz.c', + 'fmpz_mod_mat/clear.c', + 'fmpz_mod_mat/comparison.c', + 'fmpz_mod_mat/det.c', + 'fmpz_mod_mat/fmpz_vec_mul.c', + 'fmpz_mod_mat/fmpz_vec_mul_ptr.c', + 'fmpz_mod_mat/howell_form.c', + 'fmpz_mod_mat/init.c', + 'fmpz_mod_mat/init_set.c', + 'fmpz_mod_mat/inlines.c', + 'fmpz_mod_mat/inv.c', + 'fmpz_mod_mat/io.c', + 'fmpz_mod_mat/lu.c', + 'fmpz_mod_mat/minpoly.c', + 'fmpz_mod_mat/mul.c', + 'fmpz_mod_mat/mul_classical_threaded.c', + 'fmpz_mod_mat/mul_fmpz_vec.c', + 'fmpz_mod_mat/mul_fmpz_vec_ptr.c', + 'fmpz_mod_mat/neg.c', + 'fmpz_mod_mat/nullspace.c', + 'fmpz_mod_mat/randrank.c', + 'fmpz_mod_mat/randtest.c', + 'fmpz_mod_mat/randtril.c', + 'fmpz_mod_mat/randtriu.c', + 'fmpz_mod_mat/rank.c', + 'fmpz_mod_mat/reduce_row.c', + 'fmpz_mod_mat/rref.c', + 'fmpz_mod_mat/scalar_mul_fmpz.c', + 'fmpz_mod_mat/scalar_mul_si.c', + 'fmpz_mod_mat/scalar_mul_ui.c', + 'fmpz_mod_mat/set_fmpz_mat.c', + 'fmpz_mod_mat/set_get.c', + 'fmpz_mod_mat/similarity.c', + 'fmpz_mod_mat/solve.c', + 'fmpz_mod_mat/solve_tril.c', + 'fmpz_mod_mat/solve_triu.c', + 'fmpz_mod_mat/sqr.c', + 'fmpz_mod_mat/strong_echelon_form.c', + 'fmpz_mod_mat/sub.c', + 'fmpz_mod_mat/submul.c', + 'fmpz_mod_mat/swap.c', + 'fmpz_mod_mat/trace.c', + 'fmpz_mod_mat/window_clear.c', + 'fmpz_mod_mat/window_init.c', + 'fmpz_mod_mpoly/add.c', + 'fmpz_mod_mpoly/add_fmpz.c', + 'fmpz_mod_mpoly/clear.c', + 'fmpz_mod_mpoly/cmp.c', + 'fmpz_mod_mpoly/combine_like_terms.c', + 'fmpz_mod_mpoly/compose_fmpz_mod_mpoly.c', + 'fmpz_mod_mpoly/compose_fmpz_mod_mpoly_geobucket.c', + 'fmpz_mod_mpoly/compose_mat.c', + 'fmpz_mod_mpoly/content_vars.c', + 'fmpz_mod_mpoly/ctx_clear.c', + 'fmpz_mod_mpoly/ctx_init.c', + 'fmpz_mod_mpoly/ctx_init_rand.c', + 'fmpz_mod_mpoly/deflate.c', + 'fmpz_mod_mpoly/deflation.c', + 'fmpz_mod_mpoly/degrees.c', + 'fmpz_mod_mpoly/derivative.c', + 'fmpz_mod_mpoly/discriminant.c', + 'fmpz_mod_mpoly/div.c', + 'fmpz_mod_mpoly/divides.c', + 'fmpz_mod_mpoly/divides_dense.c', + 'fmpz_mod_mpoly/divides_monagan_pearce.c', + 'fmpz_mod_mpoly/div_monagan_pearce.c', + 'fmpz_mod_mpoly/divrem.c', + 'fmpz_mod_mpoly/divrem_ideal.c', + 'fmpz_mod_mpoly/divrem_ideal_monagan_pearce.c', + 'fmpz_mod_mpoly/divrem_monagan_pearce.c', + 'fmpz_mod_mpoly/equal.c', + 'fmpz_mod_mpoly/equal_fmpz.c', + 'fmpz_mod_mpoly/evaluate_all_fmpz.c', + 'fmpz_mod_mpoly/evaluate_one.c', + 'fmpz_mod_mpoly_factor/bpoly_factor_smprime.c', + 'fmpz_mod_mpoly_factor/bpoly_hlift.c', + 'fmpz_mod_mpoly_factor/clear.c', + 'fmpz_mod_mpoly_factor/cmp.c', + 'fmpz_mod_mpoly_factor/compression.c', + 'fmpz_mod_mpoly_factor/eval.c', + 'fmpz_mod_mpoly_factor/expand.c', + 'fmpz_mod_mpoly_factor/factor.c', + 'fmpz_mod_mpoly_factor/factor_content.c', + 'fmpz_mod_mpoly_factor/factor_squarefree.c', + 'fmpz_mod_mpoly_factor/fit_length.c', + 'fmpz_mod_mpoly_factor/fmpz_mod_bpoly.c', + 'fmpz_mod_mpoly_factor/fmpz_mod_mat_extras.c', + 'fmpz_mod_mpoly_factor/fmpz_mod_poly_extras.c', + 'fmpz_mod_mpoly_factor/fmpz_mod_poly_vec.c', + 'fmpz_mod_mpoly_factor/fmpz_mod_pow_cache.c', + 'fmpz_mod_mpoly_factor/gcd_algo.c', + 'fmpz_mod_mpoly_factor/gcd_brown.c', + 'fmpz_mod_mpoly_factor/gcd_hensel.c', + 'fmpz_mod_mpoly_factor/gcd_zippel2.c', + 'fmpz_mod_mpoly_factor/gcd_zippel.c', + 'fmpz_mod_mpoly_factor/get_set_lead0.c', + 'fmpz_mod_mpoly_factor/inlines.c', + 'fmpz_mod_mpoly_factor/interp.c', + 'fmpz_mod_mpoly_factor/io.c', + 'fmpz_mod_mpoly_factor/irred_smprime_wang.c', + 'fmpz_mod_mpoly_factor/irred_smprime_zassenhaus.c', + 'fmpz_mod_mpoly_factor/irred_smprime_zippel.c', + 'fmpz_mod_mpoly_factor/lcc_wang.c', + 'fmpz_mod_mpoly_factor/mpoly_hlift.c', + 'fmpz_mod_mpoly_factor/mpoly_hlift_zippel.c', + 'fmpz_mod_mpoly_factor/mpolyn.c', + 'fmpz_mod_mpoly_factor/mpolyn_divides.c', + 'fmpz_mod_mpoly_factor/mpoly_pfrac.c', + 'fmpz_mod_mpoly_factor/mpolyu.c', + 'fmpz_mod_mpoly_factor/mpolyv.c', + 'fmpz_mod_mpoly_factor/polyu3_mod_hlift.c', + 'fmpz_mod_mpoly_factor/polyun.c', + 'fmpz_mod_mpoly_factor/realloc.c', + 'fmpz_mod_mpoly_factor/set_nmod_mpoly_factor.c', + 'fmpz_mod_mpoly_factor/sort.c', + 'fmpz_mod_mpoly_factor/stack.c', + 'fmpz_mod_mpoly_factor/zip_helpers.c', + 'fmpz_mod_mpoly/fit_length.c', + 'fmpz_mod_mpoly/fit_length_fit_bits.c', + 'fmpz_mod_mpoly/fit_length_reset_bits.c', + 'fmpz_mod_mpoly/gcd_brown.c', + 'fmpz_mod_mpoly/gcd.c', + 'fmpz_mod_mpoly/gcd_cofactors.c', + 'fmpz_mod_mpoly/gcd_hensel.c', + 'fmpz_mod_mpoly/gcd_subresultant.c', + 'fmpz_mod_mpoly/gcd_zippel2.c', + 'fmpz_mod_mpoly/gcd_zippel.c', + 'fmpz_mod_mpoly/gen.c', + 'fmpz_mod_mpoly/geobuckets.c', + 'fmpz_mod_mpoly/get_coeff_fmpz_fmpz.c', + 'fmpz_mod_mpoly/get_coeff_fmpz_monomial.c', + 'fmpz_mod_mpoly/get_coeff_fmpz_ui.c', + 'fmpz_mod_mpoly/get_coeff_vars_ui.c', + 'fmpz_mod_mpoly/get_fmpz.c', + 'fmpz_mod_mpoly/get_set_is_fmpz_mod_poly.c', + 'fmpz_mod_mpoly/get_set_nmod_mpoly.c', + 'fmpz_mod_mpoly/get_str_pretty.c', + 'fmpz_mod_mpoly/get_term.c', + 'fmpz_mod_mpoly/get_term_coeff_fmpz.c', + 'fmpz_mod_mpoly/get_term_exp_fmpz.c', + 'fmpz_mod_mpoly/get_term_exp_si.c', + 'fmpz_mod_mpoly/get_term_exp_ui.c', + 'fmpz_mod_mpoly/get_term_monomial.c', + 'fmpz_mod_mpoly/get_term_var_exp_si.c', + 'fmpz_mod_mpoly/get_term_var_exp_ui.c', + 'fmpz_mod_mpoly/inflate.c', + 'fmpz_mod_mpoly/init.c', + 'fmpz_mod_mpoly/inlines.c', + 'fmpz_mod_mpoly/io.c', + 'fmpz_mod_mpoly/is_canonical.c', + 'fmpz_mod_mpoly/is_fmpz.c', + 'fmpz_mod_mpoly/is_gen.c', + 'fmpz_mod_mpoly/lead_coeff_vars.c', + 'fmpz_mod_mpoly/make_monic.c', + 'fmpz_mod_mpoly/mul.c', + 'fmpz_mod_mpoly/mul_dense.c', + 'fmpz_mod_mpoly/mul_johnson.c', + 'fmpz_mod_mpoly/neg.c', + 'fmpz_mod_mpoly/pow_fmpz.c', + 'fmpz_mod_mpoly/pow_rmul.c', + 'fmpz_mod_mpoly/pow_ui.c', + 'fmpz_mod_mpoly/push_term_fmpz_fmpz.c', + 'fmpz_mod_mpoly/push_term_fmpz_ui.c', + 'fmpz_mod_mpoly/quadratic_root.c', + 'fmpz_mod_mpoly/randtest_bits.c', + 'fmpz_mod_mpoly/randtest_bound.c', + 'fmpz_mod_mpoly/randtest_bounds.c', + 'fmpz_mod_mpoly/repack_bits.c', + 'fmpz_mod_mpoly/resize.c', + 'fmpz_mod_mpoly/resultant.c', + 'fmpz_mod_mpoly/scalar_addmul_fmpz.c', + 'fmpz_mod_mpoly/scalar_mul_fmpz.c', + 'fmpz_mod_mpoly/set.c', + 'fmpz_mod_mpoly/set_coeff_fmpz_fmpz.c', + 'fmpz_mod_mpoly/set_coeff_fmpz_monomial.c', + 'fmpz_mod_mpoly/set_coeff_fmpz_ui.c', + 'fmpz_mod_mpoly/set_fmpz.c', + 'fmpz_mod_mpoly/set_str_pretty.c', + 'fmpz_mod_mpoly/set_term_coeff_fmpz.c', + 'fmpz_mod_mpoly/set_term_exp_fmpz.c', + 'fmpz_mod_mpoly/set_term_exp_ui.c', + 'fmpz_mod_mpoly/sort_terms.c', + 'fmpz_mod_mpoly/sqrt_heap.c', + 'fmpz_mod_mpoly/sub.c', + 'fmpz_mod_mpoly/sub_fmpz.c', + 'fmpz_mod_mpoly/term_content.c', + 'fmpz_mod_mpoly/term_exp_fits.c', + 'fmpz_mod_mpoly/to_from_nmod_poly.c', + 'fmpz_mod_mpoly/univar.c', + 'fmpz_mod_mpoly/void_ring.c', + 'fmpz_mod/mul.c', + 'fmpz_mod/neg.c', + 'fmpz_mod/next_smooth_prime.c', + 'fmpz_mod_poly/add.c', + 'fmpz_mod_poly/add_series.c', + 'fmpz_mod_poly/attributes.c', + 'fmpz_mod_poly/berlekamp_massey.c', + 'fmpz_mod_poly/clear.c', + 'fmpz_mod_poly/comparison.c', + 'fmpz_mod_poly/compose.c', + 'fmpz_mod_poly/compose_mod_brent_kung.c', + 'fmpz_mod_poly/compose_mod_brent_kung_precomp_preinv.c', + 'fmpz_mod_poly/compose_mod_brent_kung_preinv.c', + 'fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c', + 'fmpz_mod_poly/compose_mod_brent_kung_vec_preinv_threaded.c', + 'fmpz_mod_poly/compose_mod.c', + 'fmpz_mod_poly/compose_mod_horner.c', + 'fmpz_mod_poly/deflate.c', + 'fmpz_mod_poly/deflation.c', + 'fmpz_mod_poly/derivative.c', + 'fmpz_mod_poly/discriminant.c', + 'fmpz_mod_poly/div.c', + 'fmpz_mod_poly/divides.c', + 'fmpz_mod_poly/divides_classical.c', + 'fmpz_mod_poly/div_newton_n_preinv.c', + 'fmpz_mod_poly/divrem_basecase.c', + 'fmpz_mod_poly/divrem.c', + 'fmpz_mod_poly/divrem_f.c', + 'fmpz_mod_poly/divrem_newton_n_preinv.c', + 'fmpz_mod_poly/div_series.c', + 'fmpz_mod_poly/evaluate_fmpz.c', + 'fmpz_mod_poly/evaluate_fmpz_vec.c', + 'fmpz_mod_poly_factor/clear.c', + 'fmpz_mod_poly_factor/concat.c', + 'fmpz_mod_poly_factor/factor_berlekamp.c', + 'fmpz_mod_poly_factor/factor.c', + 'fmpz_mod_poly_factor/factor_cantor_zassenhaus.c', + 'fmpz_mod_poly_factor/factor_distinct_deg.c', + 'fmpz_mod_poly_factor/factor_distinct_deg_threaded.c', + 'fmpz_mod_poly_factor/factor_equal_deg.c', + 'fmpz_mod_poly_factor/factor_equal_deg_prob.c', + 'fmpz_mod_poly_factor/factor_kaltofen_shoup.c', + 'fmpz_mod_poly_factor/factor_squarefree.c', + 'fmpz_mod_poly_factor/fit_length.c', + 'fmpz_mod_poly_factor/get_poly.c', + 'fmpz_mod_poly_factor/init.c', + 'fmpz_mod_poly_factor/inlines.c', + 'fmpz_mod_poly_factor/insert.c', + 'fmpz_mod_poly_factor/is_irreducible.c', + 'fmpz_mod_poly_factor/is_irreducible_ddf.c', + 'fmpz_mod_poly_factor/is_irreducible_rabin.c', + 'fmpz_mod_poly_factor/is_irreducible_rabin_f.c', + 'fmpz_mod_poly_factor/is_squarefree.c', + 'fmpz_mod_poly_factor/is_squarefree_f.c', + 'fmpz_mod_poly_factor/pow.c', + 'fmpz_mod_poly_factor/print.c', + 'fmpz_mod_poly_factor/print_pretty.c', + 'fmpz_mod_poly_factor/realloc.c', + 'fmpz_mod_poly_factor/roots.c', + 'fmpz_mod_poly_factor/roots_factored.c', + 'fmpz_mod_poly_factor/set.c', + 'fmpz_mod_poly/find_distinct_nonzero_roots.c', + 'fmpz_mod_poly/fit_length.c', + 'fmpz_mod_poly/frobenius_power.c', + 'fmpz_mod_poly/frobenius_powers_2exp_clear.c', + 'fmpz_mod_poly/frobenius_powers_2exp_precomp.c', + 'fmpz_mod_poly/frobenius_powers_clear.c', + 'fmpz_mod_poly/frobenius_powers_precomp.c', + 'fmpz_mod_poly/gcd.c', + 'fmpz_mod_poly/gcd_euclidean_f.c', + 'fmpz_mod_poly/gcdinv.c', + 'fmpz_mod_poly/gcdinv_euclidean.c', + 'fmpz_mod_poly/gcdinv_euclidean_f.c', + 'fmpz_mod_poly/gcdinv_f.c', + 'fmpz_mod_poly/gen.c', + 'fmpz_mod_poly/get.c', + 'fmpz_mod_poly/get_str.c', + 'fmpz_mod_poly/hamming_weight.c', + 'fmpz_mod_poly/hgcd.c', + 'fmpz_mod_poly/inflate.c', + 'fmpz_mod_poly/init.c', + 'fmpz_mod_poly/inlines.c', + 'fmpz_mod_poly/invmod.c', + 'fmpz_mod_poly/invmod_f.c', + 'fmpz_mod_poly/inv_series.c', + 'fmpz_mod_poly/inv_series_newton_f.c', + 'fmpz_mod_poly/invsqrt_series.c', + 'fmpz_mod_poly/io.c', + 'fmpz_mod_poly/is_canonical.c', + 'fmpz_mod_poly/make_monic.c', + 'fmpz_mod_poly/make_monic_f.c', + 'fmpz_mod_poly/minpoly.c', + 'fmpz_mod_poly/mul.c', + 'fmpz_mod_poly/mulhigh.c', + 'fmpz_mod_poly/mullow.c', + 'fmpz_mod_poly/mulmod.c', + 'fmpz_mod_poly/mulmod_preinv.c', + 'fmpz_mod_poly/neg.c', + 'fmpz_mod_poly/one.c', + 'fmpz_mod_poly/pow.c', + 'fmpz_mod_poly/powers_mod_bsgs_threaded.c', + 'fmpz_mod_poly/powers_mod_naive.c', + 'fmpz_mod_poly/powmod_fmpz_binexp.c', + 'fmpz_mod_poly/powmod_fmpz_binexp_preinv.c', + 'fmpz_mod_poly/powmod_linear_fmpz_preinv.c', + 'fmpz_mod_poly/powmod_ui_binexp.c', + 'fmpz_mod_poly/powmod_ui_binexp_preinv.c', + 'fmpz_mod_poly/powmod_x_fmpz_preinv.c', + 'fmpz_mod_poly/pow_trunc_binexp.c', + 'fmpz_mod_poly/pow_trunc.c', + 'fmpz_mod_poly/product_roots_fmpz_vec.c', + 'fmpz_mod_poly/radix.c', + 'fmpz_mod_poly/randtest.c', + 'fmpz_mod_poly/randtest_monic_primitive.c', + 'fmpz_mod_poly/realloc.c', + 'fmpz_mod_poly/rem_basecase.c', + 'fmpz_mod_poly/rem.c', + 'fmpz_mod_poly/remove.c', + 'fmpz_mod_poly/resultant.c', + 'fmpz_mod_poly/reverse.c', + 'fmpz_mod_poly/scalar.c', + 'fmpz_mod_poly/set.c', + 'fmpz_mod_poly/set_get_coeff.c', + 'fmpz_mod_poly/set_length.c', + 'fmpz_mod_poly/set_trunc.c', + 'fmpz_mod_poly/shift_left.c', + 'fmpz_mod_poly/shift_right.c', + 'fmpz_mod_poly/sqr.c', + 'fmpz_mod_poly/sqrt.c', + 'fmpz_mod_poly/sqrt_series.c', + 'fmpz_mod_poly/sub.c', + 'fmpz_mod_poly/sub_series.c', + 'fmpz_mod_poly/tree.c', + 'fmpz_mod_poly/truncate.c', + 'fmpz_mod_poly/xgcd.c', + 'fmpz_mod_poly/xgcd_euclidean_f.c', + 'fmpz_mod_poly/zero_coeffs.c', + 'fmpz_mod/pow.c', + 'fmpz_mod/rand.c', + 'fmpz_mod/set_fmpz.c', + 'fmpz_mod/set_modulus.c', + 'fmpz_mod/sub.c', + 'fmpz_mod_vec/add.c', + 'fmpz_mod_vec/dot.c', + 'fmpz_mod_vec/mul.c', + 'fmpz_mod_vec/neg.c', + 'fmpz_mod_vec/scalar.c', + 'fmpz_mod_vec/set_fmpz_vec.c', + 'fmpz_mod_vec/sub.c', + 'fmpz/moebius_mu.c', + 'fmpz_mpoly/add.c', + 'fmpz_mpoly/add_fmpz.c', + 'fmpz_mpoly/buchberger_naive.c', + 'fmpz_mpoly/clear.c', + 'fmpz_mpoly/cmp.c', + 'fmpz_mpoly/combine_like_terms.c', + 'fmpz_mpoly/compose_fmpz_mpoly.c', + 'fmpz_mpoly/compose_fmpz_mpoly_gen.c', + 'fmpz_mpoly/compose_fmpz_mpoly_geobucket.c', + 'fmpz_mpoly/compose_fmpz_mpoly_horner.c', + 'fmpz_mpoly/compose_fmpz_poly.c', + 'fmpz_mpoly/compose_mat.c', + 'fmpz_mpoly/content_vars.c', + 'fmpz_mpoly/ctx.c', + 'fmpz_mpoly/deflate.c', + 'fmpz_mpoly/deflation.c', + 'fmpz_mpoly/degrees.c', + 'fmpz_mpoly/derivative.c', + 'fmpz_mpoly/discriminant.c', + 'fmpz_mpoly/div.c', + 'fmpz_mpoly/divides_array.c', + 'fmpz_mpoly/divides.c', + 'fmpz_mpoly/divides_heap_threaded.c', + 'fmpz_mpoly/divides_monagan_pearce.c', + 'fmpz_mpoly/div_monagan_pearce.c', + 'fmpz_mpoly/divrem_array.c', + 'fmpz_mpoly/divrem.c', + 'fmpz_mpoly/divrem_ideal.c', + 'fmpz_mpoly/equal.c', + 'fmpz_mpoly/equal_fmpz.c', + 'fmpz_mpoly/equal_si.c', + 'fmpz_mpoly/equal_ui.c', + 'fmpz_mpoly/evaluate_all.c', + 'fmpz_mpoly/evaluate_all_fmpz_mod.c', + 'fmpz_mpoly/evaluate_all_nmod.c', + 'fmpz_mpoly/evaluate_one.c', + 'fmpz_mpoly_factor/add.c', + 'fmpz_mpoly_factor/bpoly.c', + 'fmpz_mpoly_factor/bpoly_factor.c', + 'fmpz_mpoly_factor/clear.c', + 'fmpz_mpoly_factor/cmp.c', + 'fmpz_mpoly_factor/compression.c', + 'fmpz_mpoly_factor/eval.c', + 'fmpz_mpoly_factor/expand.c', + 'fmpz_mpoly_factor/factor_bound_si.c', + 'fmpz_mpoly_factor/factor.c', + 'fmpz_mpoly_factor/factor_content.c', + 'fmpz_mpoly_factor/factor_squarefree.c', + 'fmpz_mpoly_factor/fit_length.c', + 'fmpz_mpoly_factor/gcd_algo.c', + 'fmpz_mpoly_factor/gcd_brown.c', + 'fmpz_mpoly_factor/gcd_brown_threaded.c', + 'fmpz_mpoly_factor/gcd_hensel.c', + 'fmpz_mpoly_factor/gcd_zippel2.c', + 'fmpz_mpoly_factor/gcd_zippel.c', + 'fmpz_mpoly_factor/get_set_lead0.c', + 'fmpz_mpoly_factor/init.c', + 'fmpz_mpoly_factor/inlines.c', + 'fmpz_mpoly_factor/interp.c', + 'fmpz_mpoly_factor/irred_wang.c', + 'fmpz_mpoly_factor/irred_zassenhaus.c', + 'fmpz_mpoly_factor/irred_zippel.c', + 'fmpz_mpoly_factor/lcc_kaltofen.c', + 'fmpz_mpoly_factor/lcc_wang.c', + 'fmpz_mpoly_factor/misc.c', + 'fmpz_mpoly_factor/mpoly_hlift.c', + 'fmpz_mpoly_factor/mpolyl.c', + 'fmpz_mpoly_factor/mpoly_pfrac.c', + 'fmpz_mpoly_factor/mpolyv.c', + 'fmpz_mpoly_factor/poly_pfrac.c', + 'fmpz_mpoly_factor/print_pretty.c', + 'fmpz_mpoly_factor/realloc.c', + 'fmpz_mpoly_factor/set.c', + 'fmpz_mpoly_factor/sort.c', + 'fmpz_mpoly_factor/tpoly.c', + 'fmpz_mpoly_factor/tuple.c', + 'fmpz_mpoly/fit_bits.c', + 'fmpz_mpoly/fit_length.c', + 'fmpz_mpoly/fit_length_reset_bits.c', + 'fmpz_mpoly/gcd_brown.c', + 'fmpz_mpoly/gcd.c', + 'fmpz_mpoly/gcd_cofactors.c', + 'fmpz_mpoly/gcd_hensel.c', + 'fmpz_mpoly/gcd_subresultant.c', + 'fmpz_mpoly/gcd_zippel2.c', + 'fmpz_mpoly/gcd_zippel.c', + 'fmpz_mpoly/gen.c', + 'fmpz_mpoly/geobuckets.c', + 'fmpz_mpoly/get_coeff_fmpz_fmpz.c', + 'fmpz_mpoly/get_coeff_fmpz_monomial.c', + 'fmpz_mpoly/get_coeff_fmpz_ui.c', + 'fmpz_mpoly/get_coeff_si_fmpz.c', + 'fmpz_mpoly/get_coeff_si_ui.c', + 'fmpz_mpoly/get_coeff_ui_fmpz.c', + 'fmpz_mpoly/get_coeff_ui_ui.c', + 'fmpz_mpoly/get_coeff_vars_ui.c', + 'fmpz_mpoly/get_fmpz.c', + 'fmpz_mpoly/get_set_is_fmpz_poly.c', + 'fmpz_mpoly/get_str_pretty.c', + 'fmpz_mpoly/get_term.c', + 'fmpz_mpoly/get_term_coeff_fmpz.c', + 'fmpz_mpoly/get_term_exp_fmpz.c', + 'fmpz_mpoly/get_term_exp_si.c', + 'fmpz_mpoly/get_term_exp_ui.c', + 'fmpz_mpoly/get_term_monomial.c', + 'fmpz_mpoly/get_term_var_exp_si.c', + 'fmpz_mpoly/get_term_var_exp_ui.c', + 'fmpz_mpoly/inflate.c', + 'fmpz_mpoly/init.c', + 'fmpz_mpoly/inlines.c', + 'fmpz_mpoly/integral.c', + 'fmpz_mpoly/io.c', + 'fmpz_mpoly/is_canonical.c', + 'fmpz_mpoly/is_fmpz.c', + 'fmpz_mpoly/is_gen.c', + 'fmpz_mpoly/lead_coeff_vars.c', + 'fmpz_mpoly/misc.c', + 'fmpz_mpoly/mpolyd.c', + 'fmpz_mpoly/mul_array.c', + 'fmpz_mpoly/mul_array_threaded.c', + 'fmpz_mpoly/mul.c', + 'fmpz_mpoly/mul_dense.c', + 'fmpz_mpoly/mul_heap_threaded.c', + 'fmpz_mpoly/mul_johnson.c', + 'fmpz_mpoly/mul_monomial.c', + 'fmpz_mpoly/neg.c', + 'fmpz_mpoly/pow_fmpz.c', + 'fmpz_mpoly/pow_fps.c', + 'fmpz_mpoly/pow_ui.c', + 'fmpz_mpoly/primitive_part.c', + 'fmpz_mpoly/push_term_fmpz_fmpz.c', + 'fmpz_mpoly/push_term_fmpz_ui.c', + 'fmpz_mpoly_q/add.c', + 'fmpz_mpoly_q/canonicalise.c', + 'fmpz_mpoly_q/clear.c', + 'fmpz_mpoly_q/div.c', + 'fmpz_mpoly_q/equal.c', + 'fmpz_mpoly_q/evaluate_acb.c', + 'fmpz_mpoly_q/init.c', + 'fmpz_mpoly_q/inlines.c', + 'fmpz_mpoly_q/inv.c', + 'fmpz_mpoly_q/is_canonical.c', + 'fmpz_mpoly_q/mul.c', + 'fmpz_mpoly_q/neg.c', + 'fmpz_mpoly_q/print_pretty.c', + 'fmpz_mpoly_q/randtest.c', + 'fmpz_mpoly_q/set.c', + 'fmpz_mpoly_q/sub.c', + 'fmpz_mpoly_q/swap.c', + 'fmpz_mpoly/quasidiv.c', + 'fmpz_mpoly/quasidiv_heap.c', + 'fmpz_mpoly/quasidivrem.c', + 'fmpz_mpoly/quasidivrem_heap.c', + 'fmpz_mpoly/quasidivrem_ideal.c', + 'fmpz_mpoly/quasidivrem_ideal_heap.c', + 'fmpz_mpoly_q/used_vars.c', + 'fmpz_mpoly/randtest_bits.c', + 'fmpz_mpoly/randtest_bound.c', + 'fmpz_mpoly/randtest_bounds.c', + 'fmpz_mpoly/realloc.c', + 'fmpz_mpoly/reduction_primitive_part.c', + 'fmpz_mpoly/repack_bits.c', + 'fmpz_mpoly/resize.c', + 'fmpz_mpoly/resultant.c', + 'fmpz_mpoly/reverse.c', + 'fmpz_mpoly/scalar_divexact_fmpz.c', + 'fmpz_mpoly/scalar_divides_fmpz.c', + 'fmpz_mpoly/scalar_fmma.c', + 'fmpz_mpoly/scalar_mul_fmpz.c', + 'fmpz_mpoly/select_exps.c', + 'fmpz_mpoly/set.c', + 'fmpz_mpoly/set_coeff_fmpz_fmpz.c', + 'fmpz_mpoly/set_coeff_fmpz_monomial.c', + 'fmpz_mpoly/set_coeff_fmpz_ui.c', + 'fmpz_mpoly/set_coeff_si_fmpz.c', + 'fmpz_mpoly/set_coeff_si_ui.c', + 'fmpz_mpoly/set_coeff_ui_fmpz.c', + 'fmpz_mpoly/set_coeff_ui_ui.c', + 'fmpz_mpoly/set_fmpz.c', + 'fmpz_mpoly/set_si.c', + 'fmpz_mpoly/set_str_pretty.c', + 'fmpz_mpoly/set_term_coeff_fmpz.c', + 'fmpz_mpoly/set_term_exp_fmpz.c', + 'fmpz_mpoly/set_term_exp_ui.c', + 'fmpz_mpoly/set_ui.c', + 'fmpz_mpoly/sort_terms.c', + 'fmpz_mpoly/spoly.c', + 'fmpz_mpoly/sqrt_heap.c', + 'fmpz_mpoly/sub.c', + 'fmpz_mpoly/sub_fmpz.c', + 'fmpz_mpoly/symmetric.c', + 'fmpz_mpoly/term_content.c', + 'fmpz_mpoly/term_exp_fits.c', + 'fmpz_mpoly/to_from_fmpz_poly.c', + 'fmpz_mpoly/univar.c', + 'fmpz_mpoly/vec_autoreduction.c', + 'fmpz_mpoly/vec_autoreduction_groebner.c', + 'fmpz_mpoly/vec.c', + 'fmpz_mpoly/vec_is_autoreduced.c', + 'fmpz_mpoly/vec_is_groebner.c', + 'fmpz_mpoly/vec_set_length.c', + 'fmpz_mpoly/vec_set_primitive_unique.c', + 'fmpz_mpoly/void_ring.c', + 'fmpz/mpz_readonly.c', + 'fmpz/mul_2exp.c', + 'fmpz/mul.c', + 'fmpz/mul_si_tdiv_q_2exp.c', + 'fmpz/mul_tdiv_q_2exp.c', + 'fmpz/multi_CRT.c', + 'fmpz/multi_mod.c', + 'fmpz/ndiv_qr.c', + 'fmpz/neg.c', + 'fmpz/nextprime.c', + 'fmpz/one_2exp.c', + 'fmpz_poly/2norm.c', + 'fmpz_poly/2norm_normalised_bits.c', + 'fmpz_poly/add.c', + 'fmpz_poly/add_series.c', + 'fmpz_poly/bit_pack.c', + 'fmpz_poly/bit_unpack.c', + 'fmpz_poly/bound_roots.c', + 'fmpz_poly/chebyshev_t.c', + 'fmpz_poly/chebyshev_u.c', + 'fmpz_poly/CLD_bound.c', + 'fmpz_poly/clear.c', + 'fmpz_poly/compose.c', + 'fmpz_poly/compose_divconquer.c', + 'fmpz_poly/compose_horner.c', + 'fmpz_poly/compose_series.c', + 'fmpz_poly/content.c', + 'fmpz_poly/cos_minpoly.c', + 'fmpz_poly/CRT_ui.c', + 'fmpz_poly/cyclotomic.c', + 'fmpz_poly/deflate.c', + 'fmpz_poly/deflation.c', + 'fmpz_poly/derivative.c', + 'fmpz_poly/discriminant.c', + 'fmpz_poly/div_basecase.c', + 'fmpz_poly/div.c', + 'fmpz_poly/div_divconquer.c', + 'fmpz_poly/div_divconquer_recursive.c', + 'fmpz_poly/divexact.c', + 'fmpz_poly/divhigh_smodp.c', + 'fmpz_poly/divides.c', + 'fmpz_poly/divlow_smodp.c', + 'fmpz_poly/div_preinv.c', + 'fmpz_poly/divrem_basecase.c', + 'fmpz_poly/divrem.c', + 'fmpz_poly/divrem_divconquer.c', + 'fmpz_poly/divrem_divconquer_recursive.c', + 'fmpz_poly/divremlow_divconquer_recursive.c', + 'fmpz_poly/divrem_preinv.c', + 'fmpz_poly/div_root.c', + 'fmpz_poly/div_series_basecase.c', + 'fmpz_poly/div_series.c', + 'fmpz_poly/div_series_divconquer.c', + 'fmpz_poly/equal.c', + 'fmpz_poly/equal_trunc.c', + 'fmpz_poly/eta_qexp.c', + 'fmpz_poly/eulerian_polynomial.c', + 'fmpz_poly/evaluate_divconquer_fmpq.c', + 'fmpz_poly/evaluate_divconquer_fmpz.c', + 'fmpz_poly/evaluate_fmpq.c', + 'fmpz_poly/evaluate_fmpz.c', + 'fmpz_poly/evaluate_fmpz_vec.c', + 'fmpz_poly/evaluate_horner_d_2exp.c', + 'fmpz_poly/evaluate_horner_d.c', + 'fmpz_poly/evaluate_horner_fmpq.c', + 'fmpz_poly/evaluate_horner_fmpz.c', + 'fmpz_poly/evaluate_mod.c', + 'fmpz_poly_factor/CLD_mat.c', + 'fmpz_poly_factor/clear.c', + 'fmpz_poly_factor/concat.c', + 'fmpz_poly_factor/factor.c', + 'fmpz_poly_factor/factor_cubic.c', + 'fmpz_poly_factor/factor_quadratic.c', + 'fmpz_poly_factor/factor_squarefree.c', + 'fmpz_poly_factor/factor_van_hoeij.c', + 'fmpz_poly_factor/factor_zassenhaus.c', + 'fmpz_poly_factor/factor_zassenhaus_recombination.c', + 'fmpz_poly_factor/fit_length.c', + 'fmpz_poly_factor/init.c', + 'fmpz_poly_factor/inlines.c', + 'fmpz_poly_factor/insert.c', + 'fmpz_poly_factor/print.c', + 'fmpz_poly_factor/realloc.c', + 'fmpz_poly_factor/set.c', + 'fmpz_poly_factor/van_hoeij_check_if_solved.c', + 'fmpz_poly_factor/zassenhaus_prune.c', + 'fmpz_poly_factor/zassenhaus_subset.c', + 'fmpz_poly/fibonacci.c', + 'fmpz_poly/fit_length.c', + 'fmpz_poly/gcd.c', + 'fmpz_poly/gcd_heuristic.c', + 'fmpz_poly/gcd_modular.c', + 'fmpz_poly/gcd_subresultant.c', + 'fmpz_poly/get_coeff.c', + 'fmpz_poly/get_nmod_poly.c', + 'fmpz_poly/get_str.c', + 'fmpz_poly/hensel_build_tree.c', + 'fmpz_poly/hensel_continue_lift.c', + 'fmpz_poly/hensel_lift.c', + 'fmpz_poly/hensel_lift_once.c', + 'fmpz_poly/hensel_lift_only_inverse.c', + 'fmpz_poly/hensel_lift_tree.c', + 'fmpz_poly/hensel_lift_tree_recursive.c', + 'fmpz_poly/hensel_lift_without_inverse.c', + 'fmpz_poly/hensel_start_lift.c', + 'fmpz_poly/hermite_h.c', + 'fmpz_poly/hermite_he.c', + 'fmpz_poly/inflate.c', + 'fmpz_poly/init.c', + 'fmpz_poly/inlines.c', + 'fmpz_poly/interpolate_fmpz_vec.c', + 'fmpz_poly/inv_series.c', + 'fmpz_poly/io.c', + 'fmpz_poly/is_cyclotomic.c', + 'fmpz_poly/is_one.c', + 'fmpz_poly/is_squarefree.c', + 'fmpz_poly/lcm.c', + 'fmpz_poly/legendre_pt.c', + 'fmpz_poly_mat/add.c', + 'fmpz_poly_mat/clear.c', + 'fmpz_poly_mat/concat.c', + 'fmpz_poly_mat/det.c', + 'fmpz_poly_mat/det_fflu.c', + 'fmpz_poly_mat/det_interpolate.c', + 'fmpz_poly_mat/equal.c', + 'fmpz_poly_mat/evaluate_fmpz.c', + 'fmpz_poly_mat/fflu.c', + 'fmpz_poly_mat/find_pivot_any.c', + 'fmpz_poly_mat/find_pivot_partial.c', + 'fmpz_poly_mat/init.c', + 'fmpz_poly_mat/inlines.c', + 'fmpz_poly_mat/inv.c', + 'fmpz_poly_mat/is_one.c', + 'fmpz_poly_mat/is_zero.c', + 'fmpz_poly_mat/max_bits.c', + 'fmpz_poly_mat/max_length.c', + 'fmpz_poly_mat/mul.c', + 'fmpz_poly_mat/mul_classical.c', + 'fmpz_poly_mat/mul_KS.c', + 'fmpz_poly_mat/mullow.c', + 'fmpz_poly_mat/neg.c', + 'fmpz_poly_mat/nullspace.c', + 'fmpz_poly_mat/one.c', + 'fmpz_poly_mat/pow.c', + 'fmpz_poly_mat/pow_trunc.c', + 'fmpz_poly_mat/print.c', + 'fmpz_poly_mat/prod.c', + 'fmpz_poly_mat/rand.c', + 'fmpz_poly_mat/rank.c', + 'fmpz_poly_mat/rref.c', + 'fmpz_poly_mat/scalar.c', + 'fmpz_poly_mat/set.c', + 'fmpz_poly_mat/solve.c', + 'fmpz_poly_mat/solve_fflu.c', + 'fmpz_poly_mat/solve_fflu_precomp.c', + 'fmpz_poly_mat/sqr.c', + 'fmpz_poly_mat/sqr_classical.c', + 'fmpz_poly_mat/sqr_KS.c', + 'fmpz_poly_mat/sqrlow.c', + 'fmpz_poly_mat/sub.c', + 'fmpz_poly_mat/swap.c', + 'fmpz_poly_mat/trace.c', + 'fmpz_poly_mat/transpose.c', + 'fmpz_poly_mat/truncate.c', + 'fmpz_poly_mat/window.c', + 'fmpz_poly_mat/zero.c', + 'fmpz_poly/monomial_to_newton.c', + 'fmpz_poly/mul.c', + 'fmpz_poly/mul_classical.c', + 'fmpz_poly/mulhigh.c', + 'fmpz_poly/mulhigh_classical.c', + 'fmpz_poly/mulhigh_karatsuba_n.c', + 'fmpz_poly/mulhigh_n.c', + 'fmpz_poly/mul_karatsuba.c', + 'fmpz_poly/mul_KS.c', + 'fmpz_poly/mullow.c', + 'fmpz_poly/mullow_classical.c', + 'fmpz_poly/mullow_karatsuba_n.c', + 'fmpz_poly/mullow_KS.c', + 'fmpz_poly/mullow_SS.c', + 'fmpz_poly/mullow_SS_precache.c', + 'fmpz_poly/mulmid_classical.c', + 'fmpz_poly/mul_SS.c', + 'fmpz_poly/neg.c', + 'fmpz_poly/newton_to_monomial.c', + 'fmpz_poly/normalise.c', + 'fmpz_poly/norms.c', + 'fmpz_poly/nth_derivative.c', + 'fmpz_poly/num_real_roots.c', + 'fmpz_poly/num_real_roots_sturm.c', + 'fmpz_poly/pow_addchains.c', + 'fmpz_poly/pow_binexp.c', + 'fmpz_poly/pow_binomial.c', + 'fmpz_poly/pow.c', + 'fmpz_poly/powers_clear.c', + 'fmpz_poly/powers_precompute.c', + 'fmpz_poly/power_sums.c', + 'fmpz_poly/power_sums_naive.c', + 'fmpz_poly/power_sums_to_poly.c', + 'fmpz_poly/pow_multinomial.c', + 'fmpz_poly/pow_small.c', + 'fmpz_poly/pow_trunc.c', + 'fmpz_poly/preinvert.c', + 'fmpz_poly/primitive_part.c', + 'fmpz_poly/product_roots_fmpq_vec.c', + 'fmpz_poly/product_roots_fmpz_vec.c', + 'fmpz_poly/pseudo_div.c', + 'fmpz_poly/pseudo_divrem_basecase.c', + 'fmpz_poly/pseudo_divrem_cohen.c', + 'fmpz_poly/pseudo_divrem_divconquer.c', + 'fmpz_poly/pseudo_rem.c', + 'fmpz_poly/pseudo_rem_cohen.c', + 'fmpz_poly_q/add.c', + 'fmpz_poly_q/addmul.c', + 'fmpz_poly_q/canonicalise.c', + 'fmpz_poly_q/clear.c', + 'fmpz_poly_q/derivative.c', + 'fmpz_poly_q/div.c', + 'fmpz_poly_q/evaluate_fmpq.c', + 'fmpz_poly_q/get_str.c', + 'fmpz_poly_q/get_str_pretty.c', + 'fmpz_poly_q/init.c', + 'fmpz_poly_q/inlines.c', + 'fmpz_poly_q/inv.c', + 'fmpz_poly_q/is_canonical.c', + 'fmpz_poly_q/mul.c', + 'fmpz_poly_q/pow.c', + 'fmpz_poly_q/print.c', + 'fmpz_poly_q/print_pretty.c', + 'fmpz_poly_q/randtest.c', + 'fmpz_poly_q/scalar.c', + 'fmpz_poly_q/set.c', + 'fmpz_poly_q/set_str.c', + 'fmpz_poly_q/sub.c', + 'fmpz_poly_q/submul.c', + 'fmpz_poly_q/swap.c', + 'fmpz_poly/randtest.c', + 'fmpz_poly/randtest_no_real_root.c', + 'fmpz_poly/realloc.c', + 'fmpz_poly/rem_basecase.c', + 'fmpz_poly/rem.c', + 'fmpz_poly/remove.c', + 'fmpz_poly/remove_content_2exp.c', + 'fmpz_poly/rem_powers_precomp.c', + 'fmpz_poly/resultant.c', + 'fmpz_poly/resultant_euclidean.c', + 'fmpz_poly/resultant_modular.c', + 'fmpz_poly/resultant_modular_div.c', + 'fmpz_poly/reverse.c', + 'fmpz_poly/revert_series.c', + 'fmpz_poly/scalar.c', + 'fmpz_poly/scale_2exp.c', + 'fmpz_poly/set.c', + 'fmpz_poly/set_coeff.c', + 'fmpz_poly/set_length.c', + 'fmpz_poly/set_str.c', + 'fmpz_poly/set_trunc.c', + 'fmpz_poly/shift_left.c', + 'fmpz_poly/shift_right.c', + 'fmpz_poly/signature.c', + 'fmpz_poly/sqr.c', + 'fmpz_poly/sqr_classical.c', + 'fmpz_poly/sqr_karatsuba.c', + 'fmpz_poly/sqr_KS.c', + 'fmpz_poly/sqrlow.c', + 'fmpz_poly/sqrlow_classical.c', + 'fmpz_poly/sqrlow_karatsuba_n.c', + 'fmpz_poly/sqrlow_KS.c', + 'fmpz_poly/sqrt.c', + 'fmpz_poly/sqrt_classical.c', + 'fmpz_poly/sqrt_divconquer.c', + 'fmpz_poly/sqrt_KS.c', + 'fmpz_poly/sqrtrem_classical.c', + 'fmpz_poly/sqrtrem_divconquer.c', + 'fmpz_poly/sqrt_series.c', + 'fmpz_poly/sub.c', + 'fmpz_poly/sub_series.c', + 'fmpz_poly/swap.c', + 'fmpz_poly/swinnerton_dyer.c', + 'fmpz_poly/taylor_shift.c', + 'fmpz_poly/taylor_shift_divconquer.c', + 'fmpz_poly/taylor_shift_horner.c', + 'fmpz_poly/taylor_shift_multi_mod_threaded.c', + 'fmpz_poly/theta_qexp.c', + 'fmpz_poly/truncate.c', + 'fmpz_poly/xgcd_modular.c', + 'fmpz_poly/zero_coeffs.c', + 'fmpz/pow.c', + 'fmpz/powm.c', + 'fmpz/powmod2_fmpz_preinv.c', + 'fmpz/preinvn.c', + 'fmpz/primorial.c', + 'fmpz/rand.c', + 'fmpz/remove.c', + 'fmpz/rfac.c', + 'fmpz/root.c', + 'fmpz/setbit.c', + 'fmpz/set.c', + 'fmpz/set_str.c', + 'fmpz/sgn.c', + 'fmpz/size.c', + 'fmpz/sizeinbase.c', + 'fmpz/smod.c', + 'fmpz/sqrt.c', + 'fmpz/sqrtmod.c', + 'fmpz/sqrtrem.c', + 'fmpz/sub.c', + 'fmpz/submul.c', + 'fmpz/tdiv.c', + 'fmpz/tstbit.c', + 'fmpz/val2.c', + 'fmpz_vec/add.c', + 'fmpz_vec/clear.c', + 'fmpz_vec/content.c', + 'fmpz_vec/content_chained.c', + 'fmpz_vec/dot.c', + 'fmpz_vec/equal.c', + 'fmpz_vec/get_d_vec_2exp.c', + 'fmpz_vec/get_fft.c', + 'fmpz_vec/get_nmod_vec.c', + 'fmpz_vec/height.c', + 'fmpz_vec/height_index.c', + 'fmpz_vec/inlines.c', + 'fmpz_vec/io.c', + 'fmpz_vec/is_zero.c', + 'fmpz_vec/lcm.c', + 'fmpz_vec/max_bits.c', + 'fmpz_vec/max.c', + 'fmpz_vec/max_limbs.c', + 'fmpz_vec/min.c', + 'fmpz_vec/neg.c', + 'fmpz_vec/prod.c', + 'fmpz_vec/randtest.c', + 'fmpz_vec/scalar.c', + 'fmpz_vec/set.c', + 'fmpz_vec/set_fft.c', + 'fmpz_vec/set_nmod_vec.c', + 'fmpz_vec/sort.c', + 'fmpz_vec/sub.c', + 'fmpz_vec/sum.c', + 'fmpz_vec/sum_max_bits.c', + 'fmpz_vec/swap.c', + 'fmpz_vec/zero.c', + 'fmpz/xgcd.c', + 'fmpz/xgcd_partial.c', + 'fq/add.c', + 'fq/assignments.c', + 'fq/bit_pack.c', + 'fq/bit_unpack.c', + 'fq/clear.c', + 'fq/comparisons.c', + 'fq/ctx_clear.c', + 'fq/ctx_init.c', + 'fq/ctx_init_modulus.c', + 'fq/ctx_order.c', + 'fq_default/ctx.c', + 'fq_default/get_set.c', + 'fq_default/inlines.c', + 'fq_default/io.c', + 'fq_default_mat/inlines.c', + 'fq_default_mat/io.c', + 'fq_default_poly_factor/inlines.c', + 'fq_default_poly/inlines.c', + 'fq_default_poly/io.c', + 'fq_default_poly/set_fmpz_poly.c', + 'fq_embed/derivative_inv.c', + 'fq_embed/embed.c', + 'fq_embed/matrices.c', + 'fq_embed/mul_matrix.c', + 'fq_embed/pow_series_inv.c', + 'fq/embed_templates.c', + 'fq_embed_templates/composition_matrix.c', + 'fq_embed_templates/embed.c', + 'fq_embed_templates/matrices.c', + 'fq/frobenius.c', + 'fq/gcdinv.c', + 'fq/gen.c', + 'fq/get_fmpz.c', + 'fq/get_fmpz_mod_poly.c', + 'fq/get_fmpz_poly.c', + 'fq/get_set_fmpz_mod_mat.c', + 'fq/get_str.c', + 'fq/get_str_pretty.c', + 'fq/init.c', + 'fq/inlines.c', + 'fq/inv.c', + 'fq/io.c', + 'fq_mat/inlines.c', + 'fq_mat/mul_ks_cutoff.c', + 'fq_mat/reduce_row.c', + 'fq_mat_templates/add.c', + 'fq/mat_templates.c', + 'fq_mat_templates/can_solve.c', + 'fq_mat_templates/charpoly.c', + 'fq_mat_templates/clear.c', + 'fq_mat_templates/concat_horizontal.c', + 'fq_mat_templates/concat_vertical.c', + 'fq_mat_templates/equal.c', + 'fq_mat_templates/init.c', + 'fq_mat_templates/init_set.c', + 'fq_mat_templates/inv.c', + 'fq_mat_templates/io.c', + 'fq_mat_templates/is_one.c', + 'fq_mat_templates/is_zero.c', + 'fq_mat_templates/lu.c', + 'fq_mat_templates/lu_classical.c', + 'fq_mat_templates/lu_recursive.c', + 'fq_mat_templates/mat_entry_set.c', + 'fq_mat_templates/mat_invert_cols.c', + 'fq_mat_templates/mat_swap_cols.c', + 'fq_mat_templates/mat_swap_entrywise.c', + 'fq_mat_templates/minpoly.c', + 'fq_mat_templates/mul.c', + 'fq_mat_templates/mul_classical.c', + 'fq_mat_templates/mul_KS.c', + 'fq_mat_templates/mul_vec.c', + 'fq_mat_templates/neg.c', + 'fq_mat_templates/nullspace.c', + 'fq_mat_templates/one.c', + 'fq_mat_templates/randops.c', + 'fq_mat_templates/randpermdiag.c', + 'fq_mat_templates/randrank.c', + 'fq_mat_templates/randtest.c', + 'fq_mat_templates/randtril.c', + 'fq_mat_templates/randtriu.c', + 'fq_mat_templates/rank.c', + 'fq_mat_templates/reduce_row.c', + 'fq_mat_templates/rref.c', + 'fq_mat_templates/set.c', + 'fq_mat_templates/set_fmpz_mod_mat.c', + 'fq_mat_templates/set_nmod_mat.c', + 'fq_mat_templates/similarity.c', + 'fq_mat_templates/solve.c', + 'fq_mat_templates/solve_tril.c', + 'fq_mat_templates/solve_tril_classical.c', + 'fq_mat_templates/solve_tril_recursive.c', + 'fq_mat_templates/solve_triu.c', + 'fq_mat_templates/solve_triu_classical.c', + 'fq_mat_templates/solve_triu_recursive.c', + 'fq_mat_templates/sub.c', + 'fq_mat_templates/submul.c', + 'fq_mat_templates/swap.c', + 'fq_mat_templates/vec_mul.c', + 'fq_mat_templates/window_clear.c', + 'fq_mat_templates/window_init.c', + 'fq_mat_templates/zero.c', + 'fq/mul.c', + 'fq/mul_fmpz.c', + 'fq/mul_si.c', + 'fq/mul_ui.c', + 'fq/neg.c', + 'fq_nmod/add.c', + 'fq_nmod/assignments.c', + 'fq_nmod/bit_pack.c', + 'fq_nmod/bit_unpack.c', + 'fq_nmod/comparisons.c', + 'fq_nmod/ctx_clear.c', + 'fq_nmod/ctx_init.c', + 'fq_nmod/ctx_init_modulus.c', + 'fq_nmod/ctx_order.c', + 'fq_nmod_embed/modulus_derivative_inv.c', + 'fq_nmod_embed/modulus_pow_series_inv.c', + 'fq_nmod_embed/mul_matrix.c', + 'fq_nmod/embed_templates.c', + 'fq_nmod/frobenius.c', + 'fq_nmod/gcdinv.c', + 'fq_nmod/get_fmpz.c', + 'fq_nmod/get_nmod_poly.c', + 'fq_nmod/get_set_fmpz_mod_mat.c', + 'fq_nmod/get_str.c', + 'fq_nmod/get_str_pretty.c', + 'fq_nmod/init.c', + 'fq_nmod/inlines.c', + 'fq_nmod/inv.c', + 'fq_nmod/io.c', + 'fq_nmod_mat/inlines.c', + 'fq_nmod_mat/mul_ks_cutoff.c', + 'fq_nmod_mat/reduce_row.c', + 'fq_nmod/mat_templates.c', + 'fq_nmod_mpoly/add.c', + 'fq_nmod_mpoly/add_fq_nmod.c', + 'fq_nmod_mpoly/cmp.c', + 'fq_nmod_mpoly/combine_like_terms.c', + 'fq_nmod_mpoly/compose_fq_nmod_mpoly.c', + 'fq_nmod_mpoly/compose_fq_nmod_mpoly_gen.c', + 'fq_nmod_mpoly/compose_fq_nmod_mpoly_geobucket.c', + 'fq_nmod_mpoly/compose_fq_nmod_mpoly_horner.c', + 'fq_nmod_mpoly/compose_fq_nmod_poly.c', + 'fq_nmod_mpoly/compose_mat.c', + 'fq_nmod_mpoly/content_vars.c', + 'fq_nmod_mpoly/ctx_change_modulus.c', + 'fq_nmod_mpoly/ctx_clear.c', + 'fq_nmod_mpoly/ctx_init.c', + 'fq_nmod_mpoly/ctx_init_rand.c', + 'fq_nmod_mpoly/deflate.c', + 'fq_nmod_mpoly/deflation.c', + 'fq_nmod_mpoly/degrees.c', + 'fq_nmod_mpoly/derivative.c', + 'fq_nmod_mpoly/discriminant.c', + 'fq_nmod_mpoly/div.c', + 'fq_nmod_mpoly/divides.c', + 'fq_nmod_mpoly/divides_monagan_pearce.c', + 'fq_nmod_mpoly/div_monagan_pearce.c', + 'fq_nmod_mpoly/divrem.c', + 'fq_nmod_mpoly/divrem_ideal.c', + 'fq_nmod_mpoly/divrem_ideal_monagan_pearce.c', + 'fq_nmod_mpoly/divrem_monagan_pearce.c', + 'fq_nmod_mpoly/equal.c', + 'fq_nmod_mpoly/equal_fq_nmod.c', + 'fq_nmod_mpoly/evaluate_all.c', + 'fq_nmod_mpoly/evaluate_one.c', + 'fq_nmod_mpoly_factor/append.c', + 'fq_nmod_mpoly_factor/clear.c', + 'fq_nmod_mpoly_factor/cmp.c', + 'fq_nmod_mpoly_factor/compression.c', + 'fq_nmod_mpoly_factor/eval.c', + 'fq_nmod_mpoly_factor/expand.c', + 'fq_nmod_mpoly_factor/factor.c', + 'fq_nmod_mpoly_factor/factor_content.c', + 'fq_nmod_mpoly_factor/factor_squarefree.c', + 'fq_nmod_mpoly_factor/fit_length.c', + 'fq_nmod_mpoly_factor/get_constant_fq_nmod.c', + 'fq_nmod_mpoly_factor/get_exp_si.c', + 'fq_nmod_mpoly_factor/get_set_lead0.c', + 'fq_nmod_mpoly_factor/init.c', + 'fq_nmod_mpoly_factor/inlines.c', + 'fq_nmod_mpoly_factor/io.c', + 'fq_nmod_mpoly_factor/irred_lgprime.c', + 'fq_nmod_mpoly_factor/irred_smprime_wang.c', + 'fq_nmod_mpoly_factor/irred_smprime_zassenhaus.c', + 'fq_nmod_mpoly_factor/irred_smprime_zippel.c', + 'fq_nmod_mpoly_factor/lcc_wang.c', + 'fq_nmod_mpoly_factor/mpoly_hlift.c', + 'fq_nmod_mpoly_factor/mpoly_pfrac.c', + 'fq_nmod_mpoly_factor/mpolyv.c', + 'fq_nmod_mpoly_factor/n_bpoly_fq.c', + 'fq_nmod_mpoly_factor/n_bpoly_fq_factor_lgprime.c', + 'fq_nmod_mpoly_factor/n_bpoly_fq_factor_smprime.c', + 'fq_nmod_mpoly_factor/n_bpoly_hlift.c', + 'fq_nmod_mpoly_factor/one.c', + 'fq_nmod_mpoly_factor/polyu3_hlift.c', + 'fq_nmod_mpoly_factor/polyu.c', + 'fq_nmod_mpoly_factor/polyun.c', + 'fq_nmod_mpoly_factor/realloc.c', + 'fq_nmod_mpoly_factor/set.c', + 'fq_nmod_mpoly_factor/sort.c', + 'fq_nmod_mpoly/fit_length.c', + 'fq_nmod_mpoly/fit_length_fit_bits.c', + 'fq_nmod_mpoly/fit_length_reset_bits.c', + 'fq_nmod_mpoly/fq_nmod_embed.c', + 'fq_nmod_mpoly/gcd_brown.c', + 'fq_nmod_mpoly/gcd.c', + 'fq_nmod_mpoly/gcd_cofactors.c', + 'fq_nmod_mpoly/gcd_hensel.c', + 'fq_nmod_mpoly/gcd_zippel2.c', + 'fq_nmod_mpoly/gcd_zippel.c', + 'fq_nmod_mpoly/gen.c', + 'fq_nmod_mpoly/geobuckets.c', + 'fq_nmod_mpoly/get_coeff_fq_nmod_fmpz.c', + 'fq_nmod_mpoly/get_coeff_fq_nmod_monomial.c', + 'fq_nmod_mpoly/get_coeff_fq_nmod_ui.c', + 'fq_nmod_mpoly/get_coeff_vars_ui.c', + 'fq_nmod_mpoly/get_fq_nmod.c', + 'fq_nmod_mpoly/get_set_is_fq_nmod_poly.c', + 'fq_nmod_mpoly/get_str_pretty.c', + 'fq_nmod_mpoly/get_term.c', + 'fq_nmod_mpoly/get_term_coeff_fq_nmod.c', + 'fq_nmod_mpoly/get_term_exp_fmpz.c', + 'fq_nmod_mpoly/get_term_exp_si.c', + 'fq_nmod_mpoly/get_term_exp_ui.c', + 'fq_nmod_mpoly/get_term_monomial.c', + 'fq_nmod_mpoly/get_term_var_exp_si.c', + 'fq_nmod_mpoly/get_term_var_exp_ui.c', + 'fq_nmod_mpoly/inflate.c', + 'fq_nmod_mpoly/init.c', + 'fq_nmod_mpoly/inlines.c', + 'fq_nmod_mpoly/interp.c', + 'fq_nmod_mpoly/io.c', + 'fq_nmod_mpoly/is_canonical.c', + 'fq_nmod_mpoly/is_fq_nmod.c', + 'fq_nmod_mpoly/is_gen.c', + 'fq_nmod_mpoly/is_monic.c', + 'fq_nmod_mpoly/is_one.c', + 'fq_nmod_mpoly/lead_coeff_vars.c', + 'fq_nmod_mpoly/make_monic.c', + 'fq_nmod_mpoly/mpolyn.c', + 'fq_nmod_mpoly/mpolyn_gcd_brown.c', + 'fq_nmod_mpoly/mpolyu.c', + 'fq_nmod_mpoly/mpolyu_divides.c', + 'fq_nmod_mpoly/mpolyu_gcdp_zippel.c', + 'fq_nmod_mpoly/mpolyun.c', + 'fq_nmod_mpoly/mul.c', + 'fq_nmod_mpoly/mul_johnson.c', + 'fq_nmod_mpoly/neg.c', + 'fq_nmod_mpoly/one.c', + 'fq_nmod_mpoly/pow_fmpz.c', + 'fq_nmod_mpoly/pow_rmul.c', + 'fq_nmod_mpoly/pow_ui.c', + 'fq_nmod_mpoly/push_term_fq_nmod_fmpz.c', + 'fq_nmod_mpoly/push_term_fq_nmod_ui.c', + 'fq_nmod_mpoly/quadratic_root.c', + 'fq_nmod_mpoly/randtest_bits.c', + 'fq_nmod_mpoly/randtest_bound.c', + 'fq_nmod_mpoly/randtest_bounds.c', + 'fq_nmod_mpoly/realloc.c', + 'fq_nmod_mpoly/repack_bits.c', + 'fq_nmod_mpoly/resize.c', + 'fq_nmod_mpoly/resultant.c', + 'fq_nmod_mpoly/reverse.c', + 'fq_nmod_mpoly/scalar_addmul_fq_nmod.c', + 'fq_nmod_mpoly/scalar_mul_fq_nmod.c', + 'fq_nmod_mpoly/set.c', + 'fq_nmod_mpoly/set_coeff_fq_nmod_fmpz.c', + 'fq_nmod_mpoly/set_coeff_fq_nmod_monomial.c', + 'fq_nmod_mpoly/set_coeff_fq_nmod_ui.c', + 'fq_nmod_mpoly/set_fmpz.c', + 'fq_nmod_mpoly/setform.c', + 'fq_nmod_mpoly/set_fq_nmod.c', + 'fq_nmod_mpoly/set_fq_nmod_gen.c', + 'fq_nmod_mpoly/set_str_pretty.c', + 'fq_nmod_mpoly/set_term_coeff_fq_nmod.c', + 'fq_nmod_mpoly/set_term_exp_fmpz.c', + 'fq_nmod_mpoly/set_term_exp_ui.c', + 'fq_nmod_mpoly/sort_terms.c', + 'fq_nmod_mpoly/sqrt_heap.c', + 'fq_nmod_mpoly/sub.c', + 'fq_nmod_mpoly/sub_fq_nmod.c', + 'fq_nmod_mpoly/term_content.c', + 'fq_nmod_mpoly/term_exp_fits.c', + 'fq_nmod_mpoly/to_from_fq_nmod_poly.c', + 'fq_nmod_mpoly/univar.c', + 'fq_nmod_mpoly/void_ring.c', + 'fq_nmod/mul.c', + 'fq_nmod/mul_fmpz.c', + 'fq_nmod/mul_si.c', + 'fq_nmod/mul_ui.c', + 'fq_nmod/neg.c', + 'fq_nmod/norm.c', + 'fq_nmod_poly_factor/inlines.c', + 'fq_nmod_poly_factor/iterated_frobenius_cutoff.c', + 'fq_nmod/poly_factor_templates.c', + 'fq_nmod_poly/inlines.c', + 'fq_nmod_poly/mul.c', + 'fq_nmod_poly/mul_classical.c', + 'fq_nmod_poly/mullow_univariate.c', + 'fq_nmod_poly/mul_univariate.c', + 'fq_nmod/poly_templates.c', + 'fq_nmod/pow.c', + 'fq_nmod/pth_root.c', + 'fq_nmod/rand.c', + 'fq_nmod/randtest.c', + 'fq_nmod/reduce.c', + 'fq_nmod/set_fmpz.c', + 'fq_nmod/set_nmod_poly.c', + 'fq_nmod/sqr.c', + 'fq_nmod/sub.c', + 'fq_nmod/sub_one.c', + 'fq_nmod/templates.c', + 'fq_nmod/trace.c', + 'fq_nmod_vec/dot.c', + 'fq_nmod_vec/inlines.c', + 'fq_nmod/vec_templates.c', + 'fq/norm.c', + 'fq_poly_factor/inlines.c', + 'fq_poly_factor/iterated_frobenius_cutoff.c', + 'fq/poly_factor_templates.c', + 'fq_poly_factor_templates/clear.c', + 'fq_poly_factor_templates/concat.c', + 'fq_poly_factor_templates/factor_berlekamp.c', + 'fq_poly_factor_templates/factor.c', + 'fq_poly_factor_templates/factor_cantor_zassenhaus.c', + 'fq_poly_factor_templates/factor_distinct_deg.c', + 'fq_poly_factor_templates/factor_equal_deg.c', + 'fq_poly_factor_templates/factor_equal_deg_prob.c', + 'fq_poly_factor_templates/factor_kaltofen_shoup.c', + 'fq_poly_factor_templates/factor_split_single.c', + 'fq_poly_factor_templates/factor_squarefree.c', + 'fq_poly_factor_templates/fit_length.c', + 'fq_poly_factor_templates/init.c', + 'fq_poly_factor_templates/insert.c', + 'fq_poly_factor_templates/is_irreducible_ben_or.c', + 'fq_poly_factor_templates/is_irreducible.c', + 'fq_poly_factor_templates/is_irreducible_ddf.c', + 'fq_poly_factor_templates/is_squarefree.c', + 'fq_poly_factor_templates/iterated_frobenius_preinv.c', + 'fq_poly_factor_templates/pow.c', + 'fq_poly_factor_templates/print.c', + 'fq_poly_factor_templates/print_pretty.c', + 'fq_poly_factor_templates/realloc.c', + 'fq_poly_factor_templates/roots.c', + 'fq_poly_factor_templates/set.c', + 'fq_poly/inlines.c', + 'fq_poly/mul_classical.c', + 'fq_poly/mullow_univariate.c', + 'fq_poly/mul_univariate.c', + 'fq_poly_templates/add.c', + 'fq_poly_templates/add_series.c', + 'fq_poly_templates/add_si.c', + 'fq/poly_templates.c', + 'fq_poly_templates/clear.c', + 'fq_poly_templates/comparisons.c', + 'fq_poly_templates/compose.c', + 'fq_poly_templates/compose_mod_brent_kung.c', + 'fq_poly_templates/compose_mod_brent_kung_precomp_preinv.c', + 'fq_poly_templates/compose_mod_brent_kung_preinv.c', + 'fq_poly_templates/compose_mod.c', + 'fq_poly_templates/compose_mod_horner.c', + 'fq_poly_templates/compose_mod_horner_preinv.c', + 'fq_poly_templates/compose_mod_preinv.c', + 'fq_poly_templates/deflate.c', + 'fq_poly_templates/deflation.c', + 'fq_poly_templates/derivative.c', + 'fq_poly_templates/div.c', + 'fq_poly_templates/divides.c', + 'fq_poly_templates/div_newton_n_preinv.c', + 'fq_poly_templates/divrem.c', + 'fq_poly_templates/divrem_f.c', + 'fq_poly_templates/divrem_newton_n_preinv.c', + 'fq_poly_templates/div_series.c', + 'fq_poly_templates/equal.c', + 'fq_poly_templates/equal_trunc.c', + 'fq_poly_templates/evaluate_fq.c', + 'fq_poly_templates/evaluate_fq_vec.c', + 'fq_poly_templates/evaluate_fq_vec_fast.c', + 'fq_poly_templates/evaluate_fq_vec_iter.c', + 'fq_poly_templates/fit_length.c', + 'fq_poly_templates/gcd.c', + 'fq_poly_templates/gcd_euclidean_f.c', + 'fq_poly_templates/gen.c', + 'fq_poly_templates/get_coeff.c', + 'fq_poly_templates/get_str.c', + 'fq_poly_templates/get_str_pretty.c', + 'fq_poly_templates/hamming_weight.c', + 'fq_poly_templates/inflate.c', + 'fq_poly_templates/init.c', + 'fq_poly_templates/inv_series_newton.c', + 'fq_poly_templates/invsqrt_series.c', + 'fq_poly_templates/io.c', + 'fq_poly_templates/is_gen.c', + 'fq_poly_templates/make_monic.c', + 'fq_poly_templates/mul.c', + 'fq_poly_templates/mul_classical.c', + 'fq_poly_templates/mulhigh.c', + 'fq_poly_templates/mulhigh_classical.c', + 'fq_poly_templates/mul_KS.c', + 'fq_poly_templates/mullow.c', + 'fq_poly_templates/mullow_classical.c', + 'fq_poly_templates/mullow_KS.c', + 'fq_poly_templates/mulmod.c', + 'fq_poly_templates/mulmod_preinv.c', + 'fq_poly_templates/mul_reorder.c', + 'fq_poly_templates/neg.c', + 'fq_poly_templates/normalise.c', + 'fq_poly_templates/one.c', + 'fq_poly_templates/pow.c', + 'fq_poly_templates/powmod_fmpz_binexp.c', + 'fq_poly_templates/powmod_fmpz_binexp_preinv.c', + 'fq_poly_templates/powmod_fmpz_sliding_preinv.c', + 'fq_poly_templates/powmod_ui_binexp.c', + 'fq_poly_templates/powmod_ui_binexp_preinv.c', + 'fq_poly_templates/powmod_x_fmpz_preinv.c', + 'fq_poly_templates/pow_trunc_binexp.c', + 'fq_poly_templates/pow_trunc.c', + 'fq_poly_templates/randtest.c', + 'fq_poly_templates/randtest_irreducible.c', + 'fq_poly_templates/randtest_monic.c', + 'fq_poly_templates/realloc.c', + 'fq_poly_templates/rem.c', + 'fq_poly_templates/remove.c', + 'fq_poly_templates/reverse.c', + 'fq_poly_templates/scalar_addmul_fq.c', + 'fq_poly_templates/scalar_div_fq.c', + 'fq_poly_templates/scalar_mul_fq.c', + 'fq_poly_templates/scalar_submul_fq.c', + 'fq_poly_templates/set.c', + 'fq_poly_templates/set_coeff.c', + 'fq_poly_templates/set_fmpz_mod_poly.c', + 'fq_poly_templates/set_fq.c', + 'fq_poly_templates/set_length.c', + 'fq_poly_templates/set_nmod_poly.c', + 'fq_poly_templates/set_trunc.c', + 'fq_poly_templates/shift_left.c', + 'fq_poly_templates/shift_right.c', + 'fq_poly_templates/sqr.c', + 'fq_poly_templates/sqr_classical.c', + 'fq_poly_templates/sqr_KS.c', + 'fq_poly_templates/sqr_reorder.c', + 'fq_poly_templates/sqrt.c', + 'fq_poly_templates/sqrt_series.c', + 'fq_poly_templates/sub.c', + 'fq_poly_templates/sub_series.c', + 'fq_poly_templates/swap.c', + 'fq_poly_templates/tree.c', + 'fq_poly_templates/truncate.c', + 'fq_poly_templates/xgcd.c', + 'fq_poly_templates/xgcd_euclidean_f.c', + 'fq_poly_templates/zero.c', + 'fq/pow.c', + 'fq/pow_ui.c', + 'fq/pth_root.c', + 'fq/rand.c', + 'fq/randtest.c', + 'fq/reduce.c', + 'fq/set_fmpz_mod_poly.c', + 'fq/set_fmpz_poly.c', + 'fq/sqr.c', + 'fq/sub.c', + 'fq/sub_one.c', + 'fq/swap.c', + 'fq/templates.c', + 'fq_templates/div.c', + 'fq_templates/is_invertible.c', + 'fq_templates/is_invertible_f.c', + 'fq_templates/is_square.c', + 'fq_templates/multiplicative_order.c', + 'fq_templates/sqrt.c', + 'fq/trace.c', + 'fq_vec/dot.c', + 'fq_vec/inlines.c', + 'fq_vec_templates/add.c', + 'fq/vec_templates.c', + 'fq_vec_templates/clear.c', + 'fq_vec_templates/dot.c', + 'fq_vec_templates/equal.c', + 'fq_vec_templates/init.c', + 'fq_vec_templates/io.c', + 'fq_vec_templates/is_zero.c', + 'fq_vec_templates/neg.c', + 'fq_vec_templates/randtest.c', + 'fq_vec_templates/scalar_addmul_fq.c', + 'fq_vec_templates/scalar_mul_fq.c', + 'fq_vec_templates/scalar_submul_fq.c', + 'fq_vec_templates/set.c', + 'fq_vec_templates/sub.c', + 'fq_vec_templates/swap.c', + 'fq_vec_templates/zero.c', + 'fq_zech/add.c', + 'fq_zech/bit_pack.c', + 'fq_zech/bit_unpack.c', + 'fq_zech/ctx.c', + 'fq_zech_embed/composition_matrix.c', + 'fq_zech_embed/modulus_derivative_inv.c', + 'fq_zech_embed/mul_matrix.c', + 'fq_zech/embed_templates.c', + 'fq_zech/frobenius.c', + 'fq_zech/gcdinv.c', + 'fq_zech/get_fmpz.c', + 'fq_zech/get_fq_nmod.c', + 'fq_zech/get_nmod_poly.c', + 'fq_zech/get_set_fmpz_mod_mat.c', + 'fq_zech/get_str.c', + 'fq_zech/inlines.c', + 'fq_zech/inv.c', + 'fq_zech/io.c', + 'fq_zech/is_square.c', + 'fq_zech_mat/inlines.c', + 'fq_zech_mat/mul_ks_cutoff.c', + 'fq_zech/mat_templates.c', + 'fq_zech/modulus_pow_series_inv.c', + 'fq_zech_mpoly/add.c', + 'fq_zech_mpoly/clear.c', + 'fq_zech_mpoly/combine_like_terms.c', + 'fq_zech_mpoly/ctx.c', + 'fq_zech_mpoly/degrees.c', + 'fq_zech_mpoly/derivative.c', + 'fq_zech_mpoly/divides.c', + 'fq_zech_mpoly/divides_monagan_pearce.c', + 'fq_zech_mpoly/divrem.c', + 'fq_zech_mpoly/divrem_monagan_pearce.c', + 'fq_zech_mpoly/equal.c', + 'fq_zech_mpoly/evaluate_all.c', + 'fq_zech_mpoly/evaluate_one.c', + 'fq_zech_mpoly_factor/bpoly.c', + 'fq_zech_mpoly_factor/bpoly_factor_smprime.c', + 'fq_zech_mpoly_factor/bpoly_hlift.c', + 'fq_zech_mpoly_factor/clear.c', + 'fq_zech_mpoly_factor/eval.c', + 'fq_zech_mpoly_factor/factor.c', + 'fq_zech_mpoly_factor/fit_length.c', + 'fq_zech_mpoly_factor/get_set_is_fq_nmod_poly.c', + 'fq_zech_mpoly_factor/get_set_lead0.c', + 'fq_zech_mpoly_factor/init.c', + 'fq_zech_mpoly_factor/io.c', + 'fq_zech_mpoly_factor/irred_smprime_wang.c', + 'fq_zech_mpoly_factor/irred_smprime_zassenhaus.c', + 'fq_zech_mpoly_factor/irred_smprime_zippel.c', + 'fq_zech_mpoly_factor/lcc_wang.c', + 'fq_zech_mpoly_factor/mpoly_hlift.c', + 'fq_zech_mpoly_factor/mpoly_pfrac.c', + 'fq_zech_mpoly_factor/mpoly_univar.c', + 'fq_zech_mpoly_factor/mpolyv.c', + 'fq_zech_mpoly_factor/polyu3_hlift.c', + 'fq_zech_mpoly_factor/polyu.c', + 'fq_zech_mpoly_factor/polyun.c', + 'fq_zech_mpoly_factor/realloc.c', + 'fq_zech_mpoly_factor/tpoly.c', + 'fq_zech_mpoly/fit_bits.c', + 'fq_zech_mpoly/fit_length.c', + 'fq_zech_mpoly/gcd.c', + 'fq_zech_mpoly/gcd_cofactors.c', + 'fq_zech_mpoly/gen.c', + 'fq_zech_mpoly/get_coeff_vars_ui.c', + 'fq_zech_mpoly/get_set_fq_nmod_mpoly.c', + 'fq_zech_mpoly/get_set_nmod_mpoly.c', + 'fq_zech_mpoly/init.c', + 'fq_zech_mpoly/io.c', + 'fq_zech_mpoly/is_canonical.c', + 'fq_zech_mpoly/is_fq_zech.c', + 'fq_zech_mpoly/is_one.c', + 'fq_zech_mpoly/lead_coeff_vars.c', + 'fq_zech_mpoly/make_monic.c', + 'fq_zech_mpoly/mpolyu.c', + 'fq_zech_mpoly/mul.c', + 'fq_zech_mpoly/mul_johnson.c', + 'fq_zech_mpoly/neg.c', + 'fq_zech_mpoly/pow_rmul.c', + 'fq_zech_mpoly/pow_ui.c', + 'fq_zech_mpoly/repack_bits.c', + 'fq_zech_mpoly/scalar.c', + 'fq_zech_mpoly/set.c', + 'fq_zech_mpoly/set_fq_zech.c', + 'fq_zech_mpoly/set_ui.c', + 'fq_zech_mpoly/sort_terms.c', + 'fq_zech_mpoly/sub.c', + 'fq_zech_mpoly/sub_fq_zech.c', + 'fq_zech_mpoly/term_exp_fits.c', + 'fq_zech_mpoly/univar.c', + 'fq_zech/mul.c', + 'fq_zech/neg.c', + 'fq_zech/norm.c', + 'fq_zech_poly_factor/inlines.c', + 'fq_zech_poly_factor/iterated_frobenius_cutoff.c', + 'fq_zech/poly_factor_templates.c', + 'fq_zech_poly/inlines.c', + 'fq_zech/poly_templates.c', + 'fq_zech/pow.c', + 'fq_zech/pth_root.c', + 'fq_zech/rand.c', + 'fq_zech/randtest.c', + 'fq_zech/set.c', + 'fq_zech/set_fmpz.c', + 'fq_zech/set_fq_nmod.c', + 'fq_zech/set_nmod_poly.c', + 'fq_zech/sqr.c', + 'fq_zech/sqrt.c', + 'fq_zech/sub.c', + 'fq_zech/sub_one.c', + 'fq_zech/templates.c', + 'fq_zech/trace.c', + 'fq_zech_vec/inlines.c', + 'fq_zech/vec_templates.c', + 'generic_files/clz_tab.c', + 'generic_files/exception.c', + 'generic_files/fscanf.c', + 'generic_files/gettimeofday.c', + 'generic_files/inlines.c', + 'generic_files/io.c', + 'generic_files/memory_manager.c', + 'generic_files/profiler.c', + 'generic_files/scanf.c', + 'generic_files/sprintf.c', + 'generic_files/sscanf.c', + 'generic_files/test_helpers.c', + 'generic_files/version.c', + 'gr/acb.c', + 'gr/acf.c', + 'gr/arb.c', + 'gr/arf.c', + 'gr/ca.c', + 'gr/cmp_coercion.c', + 'gr/dirichlet.c', + 'gr/fexpr.c', + 'gr/fmpq.c', + 'gr/fmpq_poly.c', + 'gr/fmpz.c', + 'gr/fmpzi.c', + 'gr/fmpz_mod.c', + 'gr/fmpz_mpoly.c', + 'gr/fmpz_mpoly_q.c', + 'gr/fmpz_poly.c', + 'gr/fq.c', + 'gr/fq_nmod.c', + 'gr/fq_zech.c', + 'gr_generic/fmpz_mpoly_evaluate.c', + 'gr_generic/fmpz_poly_evaluate.c', + 'gr_generic/fmpz_poly_evaluate_horner.c', + 'gr_generic/fmpz_poly_evaluate_rectangular.c', + 'gr_generic/generic.c', + 'gr_generic/generic_pow.c', + 'gr_generic/set_fexpr.c', + 'gr_generic/set_str_expr.c', + 'gr/init_random.c', + 'gr/inlines.c', + 'gr/io.c', + 'gr_mat/add.c', + 'gr_mat/addmul_scalar.c', + 'gr_mat/add_scalar.c', + 'gr_mat/adjugate.c', + 'gr_mat/adjugate_charpoly.c', + 'gr_mat/adjugate_cofactor.c', + 'gr_mat/apply_row_similarity.c', + 'gr_mat/charpoly_berkowitz.c', + 'gr_mat/charpoly.c', + 'gr_mat/charpoly_danilevsky.c', + 'gr_mat/charpoly_faddeev_bsgs.c', + 'gr_mat/charpoly_faddeev.c', + 'gr_mat/charpoly_hessenberg.c', + 'gr_mat/clear.c', + 'gr_mat/concat_horizontal.c', + 'gr_mat/concat_vertical.c', + 'gr_mat/det_berkowitz.c', + 'gr_mat/det.c', + 'gr_mat/det_cofactor.c', + 'gr_mat/det_fflu.c', + 'gr_mat/det_lu.c', + 'gr_mat/diag_mul.c', + 'gr_mat/diagonalization.c', + 'gr_mat/div_scalar.c', + 'gr_mat/eigenvalues.c', + 'gr_mat/equal.c', + 'gr_mat/exp.c', + 'gr_mat/fflu.c', + 'gr_mat/find_nonzero_pivot.c', + 'gr_mat/gr_poly_evaluate.c', + 'gr_mat/hadamard.c', + 'gr_mat/hessenberg.c', + 'gr_mat/hessenberg_gauss.c', + 'gr_mat/hessenberg_householder.c', + 'gr_mat/hilbert.c', + 'gr_mat/init.c', + 'gr_mat/init_set.c', + 'gr_mat/inlines.c', + 'gr_mat/inv.c', + 'gr_mat/invert_cols.c', + 'gr_mat/invert_rows.c', + 'gr_mat/io.c', + 'gr_mat/is_diagonal.c', + 'gr_mat/is_hessenberg.c', + 'gr_mat/is_lower_triangular.c', + 'gr_mat/is_neg_one.c', + 'gr_mat/is_one.c', + 'gr_mat/is_scalar.c', + 'gr_mat/is_upper_triangular.c', + 'gr_mat/is_zero.c', + 'gr_mat/jordan_blocks.c', + 'gr_mat/jordan_form.c', + 'gr_mat/jordan_transformation.c', + 'gr_mat/log.c', + 'gr_mat/lu.c', + 'gr_mat/lu_classical.c', + 'gr_mat/lu_recursive.c', + 'gr_mat/minpoly_field.c', + 'gr_mat/mul.c', + 'gr_mat/mul_classical.c', + 'gr_mat/mul_diag.c', + 'gr_mat/mul_scalar.c', + 'gr_mat/mul_strassen.c', + 'gr_mat/neg.c', + 'gr_mat/nonsingular_solve.c', + 'gr_mat/nonsingular_solve_den.c', + 'gr_mat/nonsingular_solve_den_fflu.c', + 'gr_mat/nonsingular_solve_fflu.c', + 'gr_mat/nonsingular_solve_fflu_precomp.c', + 'gr_mat/nonsingular_solve_lu.c', + 'gr_mat/nonsingular_solve_lu_precomp.c', + 'gr_mat/nonsingular_solve_tril.c', + 'gr_mat/nonsingular_solve_triu.c', + 'gr_mat/nullspace.c', + 'gr_mat/one.c', + 'gr_mat/ones.c', + 'gr_mat/pascal.c', + 'gr_mat/randops.c', + 'gr_mat/randpermdiag.c', + 'gr_mat/randrank.c', + 'gr_mat/randtest.c', + 'gr_mat/rank.c', + 'gr_mat/rank_fflu.c', + 'gr_mat/rank_lu.c', + 'gr_mat/reduce_row.c', + 'gr/matrix.c', + 'gr_mat/rref.c', + 'gr_mat/rref_den.c', + 'gr_mat/rref_fflu.c', + 'gr_mat/rref_lu.c', + 'gr_mat/set.c', + 'gr_mat/set_fmpq.c', + 'gr_mat/set_fmpq_mat.c', + 'gr_mat/set_fmpz.c', + 'gr_mat/set_fmpz_mat.c', + 'gr_mat/set_scalar.c', + 'gr_mat/set_si.c', + 'gr_mat/set_ui.c', + 'gr_mat/solve_field.c', + 'gr_mat/stirling.c', + 'gr_mat/sub.c', + 'gr_mat/submul_scalar.c', + 'gr_mat/sub_scalar.c', + 'gr_mat/swap_cols.c', + 'gr_mat/swap_entrywise.c', + 'gr_mat/swap_rows.c', + 'gr_mat/trace.c', + 'gr_mat/transpose.c', + 'gr_mat/window_init.c', + 'gr_mat/write.c', + 'gr_mat/zero.c', + 'gr_mpoly/add.c', + 'gr/mpoly.c', + 'gr_mpoly/combine_like_terms.c', + 'gr_mpoly/equal.c', + 'gr_mpoly/fit_bits.c', + 'gr_mpoly/fit_length.c', + 'gr_mpoly/fit_length_fit_bits.c', + 'gr_mpoly/fit_length_reset_bits.c', + 'gr_mpoly/gen.c', + 'gr_mpoly/get_coeff_scalar_fmpz.c', + 'gr_mpoly/get_coeff_scalar_ui.c', + 'gr_mpoly/init.c', + 'gr_mpoly/inlines.c', + 'gr_mpoly/is_canonical.c', + 'gr_mpoly/mul.c', + 'gr_mpoly/mul_johnson.c', + 'gr_mpoly/mul_monomial.c', + 'gr_mpoly/mul_scalar.c', + 'gr_mpoly/neg.c', + 'gr_mpoly/push_term.c', + 'gr_mpoly/randtest_bits.c', + 'gr_mpoly/randtest_bound.c', + 'gr_mpoly/set.c', + 'gr_mpoly/set_coeff_scalar_fmpz.c', + 'gr_mpoly/set_coeff_scalar_ui.c', + 'gr_mpoly/set_scalar.c', + 'gr_mpoly/sort_terms.c', + 'gr_mpoly/sub.c', + 'gr_mpoly/write.c', + 'gr/nf.c', + 'gr/nmod32.c', + 'gr/nmod8.c', + 'gr/nmod.c', + 'gr/perm.c', + 'gr_poly/add.c', + 'gr_poly/asin_series.c', + 'gr_poly/clear.c', + 'gr_poly/compose.c', + 'gr_poly/compose_divconquer.c', + 'gr_poly/compose_horner.c', + 'gr_poly/compose_series_brent_kung.c', + 'gr_poly/compose_series.c', + 'gr_poly/compose_series_divconquer.c', + 'gr_poly/compose_series_horner.c', + 'gr_poly/derivative.c', + 'gr_poly/div_basecase.c', + 'gr_poly/div.c', + 'gr_poly/div_divconquer.c', + 'gr_poly/divexact_basecase.c', + 'gr_poly/divexact_bidirectional.c', + 'gr_poly/divexact.c', + 'gr_poly/divexact_series_basecase.c', + 'gr_poly/div_newton.c', + 'gr_poly/divrem_basecase.c', + 'gr_poly/divrem.c', + 'gr_poly/divrem_divconquer.c', + 'gr_poly/divrem_newton.c', + 'gr_poly/div_scalar.c', + 'gr_poly/div_series_basecase.c', + 'gr_poly/div_series.c', + 'gr_poly/div_series_divconquer.c', + 'gr_poly/div_series_invmul.c', + 'gr_poly/div_series_newton.c', + 'gr_poly/equal.c', + 'gr_poly/evaluate.c', + 'gr_poly/evaluate_horner.c', + 'gr_poly/evaluate_modular.c', + 'gr_poly/evaluate_other.c', + 'gr_poly/evaluate_other_horner.c', + 'gr_poly/evaluate_other_rectangular.c', + 'gr_poly/evaluate_rectangular.c', + 'gr_poly/evaluate_vec_fast.c', + 'gr_poly/evaluate_vec_iter.c', + 'gr_poly/exp_series_basecase.c', + 'gr_poly/exp_series_basecase_mul.c', + 'gr_poly/exp_series.c', + 'gr_poly/exp_series_newton.c', + 'gr_poly/factor_squarefree.c', + 'gr_poly/fit_length.c', + 'gr_poly/gcd.c', + 'gr_poly/gcd_euclidean.c', + 'gr_poly/gcd_hgcd.c', + 'gr_poly/gen.c', + 'gr_poly/get_coeff_scalar.c', + 'gr_poly/hgcd.c', + 'gr_poly/init.c', + 'gr_poly/inlines.c', + 'gr_poly/integral.c', + 'gr_poly/inv.c', + 'gr_poly/inv_series_basecase.c', + 'gr_poly/inv_series.c', + 'gr_poly/inv_series_newton.c', + 'gr_poly/is_gen.c', + 'gr_poly/is_monic.c', + 'gr_poly/is_one.c', + 'gr_poly/is_scalar.c', + 'gr_poly/is_zero.c', + 'gr_poly/log1p_series.c', + 'gr_poly/log_series.c', + 'gr_poly/make_monic.c', + 'gr_poly/mul.c', + 'gr_poly/mullow.c', + 'gr_poly/mul_scalar.c', + 'gr_poly/neg.c', + 'gr_poly/neg_one.c', + 'gr/polynomial.c', + 'gr_poly/normalise.c', + 'gr_poly/nth_derivative.c', + 'gr_poly/one.c', + 'gr_poly/pow_fmpz.c', + 'gr_poly/pow_series_fmpq_recurrence.c', + 'gr_poly/pow_series_ui_binexp.c', + 'gr_poly/pow_series_ui.c', + 'gr_poly/pow_ui_binexp.c', + 'gr_poly/pow_ui.c', + 'gr_poly/randtest.c', + 'gr_poly/rem.c', + 'gr_poly/resultant.c', + 'gr_poly/resultant_euclidean.c', + 'gr_poly/resultant_hgcd.c', + 'gr_poly/resultant_small.c', + 'gr_poly/resultant_sylvester.c', + 'gr_poly/reverse.c', + 'gr_poly/revert_series.c', + 'gr_poly/rsqrt_series_basecase.c', + 'gr_poly/rsqrt_series.c', + 'gr_poly/rsqrt_series_miller.c', + 'gr_poly/rsqrt_series_newton.c', + 'gr_poly/set.c', + 'gr_poly/set_coeff_scalar.c', + 'gr_poly/set_fmpq_poly.c', + 'gr_poly/set_fmpz_poly.c', + 'gr_poly/set_gr_poly_other.c', + 'gr_poly/set_length.c', + 'gr_poly/set_scalar.c', + 'gr_poly/shift_left.c', + 'gr_poly/shift_right.c', + 'gr_poly/sin_cos_series_basecase.c', + 'gr_poly/sin_cos_series_tangent.c', + 'gr_poly/sqrt_series_basecase.c', + 'gr_poly/sqrt_series.c', + 'gr_poly/sqrt_series_miller.c', + 'gr_poly/sqrt_series_newton.c', + 'gr_poly/squarefree_part.c', + 'gr_poly/sub.c', + 'gr_poly/tan_series_basecase.c', + 'gr_poly/tan_series.c', + 'gr_poly/tan_series_newton.c', + 'gr_poly/taylor_shift.c', + 'gr_poly/taylor_shift_convolution.c', + 'gr_poly/taylor_shift_divconquer.c', + 'gr_poly/taylor_shift_horner.c', + 'gr_poly/truncate.c', + 'gr_poly/write.c', + 'gr_poly/xgcd_euclidean.c', + 'gr_poly/xgcd_hgcd.c', + 'gr/psl2z.c', + 'gr/qqbar.c', + 'gr/series.c', + 'gr/series_mod.c', + 'gr_special/bellnum.c', + 'gr_special/bin.c', + 'gr_special/chebyshev_t.c', + 'gr_special/chebyshev_u.c', + 'gr_special/dirichlet.c', + 'gr_special/elementary.c', + 'gr_special/erf.c', + 'gr_special/fac.c', + 'gr_special/fib.c', + 'gr_special/inlines.c', + 'gr_special/modular.c', + 'gr_special/partitions.c', + 'gr/test_ring.c', + 'gr_vec/append.c', + 'gr_vec/clear.c', + 'gr_vec/fit_length.c', + 'gr_vec/init.c', + 'gr_vec/inlines.c', + 'gr_vec/product.c', + 'gr_vec/randtest.c', + 'gr_vec/set.c', + 'gr_vec/set_length.c', + 'gr_vec/step.c', + 'gr_vec/sum.c', + 'gr/vector.c', + 'gr_vec/write.c', + 'hypgeom/bound.c', + 'hypgeom/estimate_terms_d.c', + 'hypgeom/init.c', + 'hypgeom/precompute.c', + 'hypgeom/sum.c', + 'long_extras/inlines.c', + 'long_extras/kronecker.c', + 'long_extras/randint.c', + 'long_extras/randtest.c', + 'long_extras/sizeinbase.c', + 'mag/add_2exp_fmpz.c', + 'mag/add.c', + 'mag/addmul.c', + 'mag/add_ui_2exp_si.c', + 'mag/add_ui.c', + 'mag/atan.c', + 'mag/bernoulli_div_fac_ui.c', + 'mag/binpow_uiui.c', + 'mag/bin_uiui.c', + 'mag/clear.c', + 'mag/cmp_2exp_si.c', + 'mag/cmp.c', + 'mag/const_pi.c', + 'mag/cosh.c', + 'mag/div.c', + 'mag/div_lower.c', + 'mag/d_log.c', + 'mag/exp.c', + 'mag/expinv.c', + 'mag/expm1.c', + 'mag/exp_tail.c', + 'mag/fac_ui.c', + 'mag/geom_series.c', + 'mag/get_d.c', + 'mag/get_d_log2_approx.c', + 'mag/get_fmpq.c', + 'mag/get_fmpz.c', + 'mag/hurwitz_zeta_uiui.c', + 'mag/hypot.c', + 'mag/inlines.c', + 'mag/io.c', + 'mag/log1p.c', + 'mag/log.c', + 'mag/log_ui.c', + 'mag/mul_2exp_fmpz.c', + 'mag/mul_2exp_si.c', + 'mag/mul.c', + 'mag/polylog_tail.c', + 'mag/pow_fmpz.c', + 'mag/pow_ui.c', + 'mag/randtest.c', + 'mag/root.c', + 'mag/rsqrt.c', + 'mag/set_d_2exp_fmpz.c', + 'mag/set_d.c', + 'mag/set_fmpz_2exp_fmpz.c', + 'mag/set_ui_2exp_si.c', + 'mag/set_ui.c', + 'mag/sinh.c', + 'mag/sqrt.c', + 'mag/sub.c', + 'mag/sub_lower.c', + 'mpfr_mat/clear.c', + 'mpfr_mat/equal.c', + 'mpfr_mat/init.c', + 'mpfr_mat/mul_classical.c', + 'mpfr_mat/randtest.c', + 'mpfr_mat/set.c', + 'mpfr_mat/swap.c', + 'mpfr_mat/zero.c', + 'mpfr_vec/add.c', + 'mpfr_vec/clear.c', + 'mpfr_vec/equal.c', + 'mpfr_vec/init.c', + 'mpfr_vec/randtest.c', + 'mpfr_vec/scalar_mul_2exp.c', + 'mpfr_vec/scalar_mul_mpfr.c', + 'mpfr_vec/scalar_product.c', + 'mpfr_vec/set.c', + 'mpfr_vec/zero.c', + 'mpn_extras/debug.c', + 'mpn_extras/divides.c', + 'mpn_extras/divrem_preinv1.c', + 'mpn_extras/divrem_preinvn.c', + 'mpn_extras/factor_trial.c', + 'mpn_extras/factor_trial_tree.c', + 'mpn_extras/fmms1.c', + 'mpn_extras/gcd_full.c', + 'mpn_extras/get_d.c', + 'mpn_extras/mod_preinvn.c', + 'mpn_extras/mul_basecase.c', + 'mpn_extras/mul.c', + 'mpn_extras/mulhigh_basecase.c', + 'mpn_extras/mulhigh.c', + 'mpn_extras/mulmod_2expp1_basecase.c', + 'mpn_extras/mulmod_preinv1.c', + 'mpn_extras/mulmod_preinvn.c', + 'mpn_extras/mul_toom22.c', + 'mpn_extras/mul_toom32.c', + 'mpn_extras/preinv1.c', + 'mpn_extras/preinvn.c', + 'mpn_extras/remove_2exp.c', + 'mpn_extras/remove_power.c', + 'mpn_extras/sqr_basecase.c', + 'mpn_extras/sqrhigh.c', + 'mpn_extras/sumdiff_n.c', + 'mpoly/bidegree.c', + 'mpoly/bivar_cld_bounds.c', + 'mpoly/cmp_general.c', + 'mpoly/compose_mat.c', + 'mpoly/compression.c', + 'mpoly/ctx.c', + 'mpoly/degrees.c', + 'mpoly/exp_bits_required.c', + 'mpoly/fill_marks.c', + 'mpoly/gcd_info.c', + 'mpoly/gen_bits_required.c', + 'mpoly/gen_fields.c', + 'mpoly/gen_monomial_offset_shift.c', + 'mpoly/gen_shift_left_right.c', + 'mpoly/get_cmpmask.c', + 'mpoly/get_monomial.c', + 'mpoly/get_monomial_var.c', + 'mpoly/heap_insert1.c', + 'mpoly/heap_insert.c', + 'mpoly/heap_pop1.c', + 'mpoly/heap_pop.c', + 'mpoly/inlines.c', + 'mpoly/io.c', + 'mpoly/is_gen.c', + 'mpoly/is_poly.c', + 'mpoly/is_proved_not_square.c', + 'mpoly/main_variable_split.c', + 'mpoly/max_fields.c', + 'mpoly/min_fields.c', + 'mpoly/monomial_cofactors.c', + 'mpoly/monomial_exists.c', + 'mpoly/monomial_index.c', + 'mpoly/monomial_mul_fmpz.c', + 'mpoly/monomials_cmp.c', + 'mpoly/monomials_deflate.c', + 'mpoly/monomials_deflation.c', + 'mpoly/monomials_inflate.c', + 'mpoly/monomials_inorder_test.c', + 'mpoly/monomials_overflow_test.c', + 'mpoly/monomials_shift_right_ui.c', + 'mpoly/monomials_valid_test.c', + 'mpoly/pack_monomials_tight.c', + 'mpoly/pack_vec.c', + 'mpoly/parse_pretty.c', + 'mpoly/randbits_fmpz.c', + 'mpoly/rbtree.c', + 'mpoly/remove_var_powers.c', + 'mpoly/repack_monomials.c', + 'mpoly/reverse.c', + 'mpoly/search_monomials.c', + 'mpoly/set_monomial.c', + 'mpoly/term_exp_fits.c', + 'mpoly/test_irreducible.c', + 'mpoly/to_from_mpolyl.c', + 'mpoly/total_degree.c', + 'mpoly/univar.c', + 'mpoly/unpack_monomials_tight.c', + 'mpoly/unpack_vec.c', + 'mpoly/used_vars.c', + 'nf/clear.c', + 'nf_elem/add.c', + 'nf_elem/clear.c', + 'nf_elem/div.c', + 'nf_elem/equal.c', + 'nf_elem/gen.c', + 'nf_elem/get_coeff_fmpq.c', + 'nf_elem/get_coeff_fmpz.c', + 'nf_elem/get_fmpq_poly.c', + 'nf_elem/get_fmpz_mat_row.c', + 'nf_elem/get_fmpz_mod_poly.c', + 'nf_elem/get_nmod_poly.c', + 'nf_elem/get_str_pretty.c', + 'nf_elem/init.c', + 'nf_elem/inlines.c', + 'nf_elem/inv.c', + 'nf_elem/invertible_check.c', + 'nf_elem/io.c', + 'nf_elem/is_gen.c', + 'nf_elem/mod_fmpz.c', + 'nf_elem/mul.c', + 'nf_elem/mul_gen.c', + 'nf_elem/neg.c', + 'nf_elem/norm.c', + 'nf_elem/norm_div.c', + 'nf_elem/one.c', + 'nf_elem/pow.c', + 'nf_elem/randtest.c', + 'nf_elem/reduce.c', + 'nf_elem/rep_mat.c', + 'nf_elem/rep_mat_fmpz_mat_den.c', + 'nf_elem/scalar_div.c', + 'nf_elem/scalar_mul.c', + 'nf_elem/set.c', + 'nf_elem/set_coeff_num_fmpz.c', + 'nf_elem/set_fmpq_poly.c', + 'nf_elem/set_fmpz_mat_row.c', + 'nf_elem/sub.c', + 'nf_elem/swap.c', + 'nf_elem/trace.c', + 'nf_elem/zero.c', + 'nf/init.c', + 'nf/init_randtest.c', + 'nf/print.c', + 'nmod/divides.c', + 'nmod/inlines.c', + 'nmod_mat/add.c', + 'nmod_mat/addmul.c', + 'nmod_mat/can_solve.c', + 'nmod_mat/charpoly.c', + 'nmod_mat/clear.c', + 'nmod_mat/concat.c', + 'nmod_mat/det.c', + 'nmod_mat/det_howell.c', + 'nmod_mat/equal.c', + 'nmod_mat/howell_form.c', + 'nmod_mat/init.c', + 'nmod_mat/inlines.c', + 'nmod_mat/inv.c', + 'nmod_mat/io.c', + 'nmod_mat/is_one.c', + 'nmod_mat/is_zero.c', + 'nmod_mat/is_zero_row.c', + 'nmod_mat/lu.c', + 'nmod_mat/lu_classical.c', + 'nmod_mat/lu_classical_delayed.c', + 'nmod_mat/lu_recursive.c', + 'nmod_mat/minpoly.c', + 'nmod_mat/mul_blas.c', + 'nmod_mat/mul.c', + 'nmod_mat/mul_classical.c', + 'nmod_mat/mul_classical_threaded.c', + 'nmod_mat/mul_nmod_vec.c', + 'nmod_mat/mul_strassen.c', + 'nmod_mat/neg.c', + 'nmod_mat/nmod_vec_mul.c', + 'nmod_mat/nullspace.c', + 'nmod_mat/one.c', + 'nmod_mat/permute_rows.c', + 'nmod_mat/pow.c', + 'nmod_mat/randfull.c', + 'nmod_mat/randops.c', + 'nmod_mat/randpermdiag.c', + 'nmod_mat/randrank.c', + 'nmod_mat/randtest.c', + 'nmod_mat/randtril.c', + 'nmod_mat/randtriu.c', + 'nmod_mat/rank.c', + 'nmod_mat/reduce_row.c', + 'nmod_mat/rref.c', + 'nmod_mat/scalar.c', + 'nmod_mat/set.c', + 'nmod_mat/set_mod.c', + 'nmod_mat/similarity.c', + 'nmod_mat/solve.c', + 'nmod_mat/solve_tril.c', + 'nmod_mat/solve_triu.c', + 'nmod_mat/solve_vec.c', + 'nmod_mat/strong_echelon_form.c', + 'nmod_mat/sub.c', + 'nmod_mat/submul.c', + 'nmod_mat/swap.c', + 'nmod_mat/trace.c', + 'nmod_mat/transpose.c', + 'nmod_mat/window.c', + 'nmod_mat/zero.c', + 'nmod_mpoly/add.c', + 'nmod_mpoly/add_ui.c', + 'nmod_mpoly/cmp.c', + 'nmod_mpoly/combine_like_terms.c', + 'nmod_mpoly/compose_mat.c', + 'nmod_mpoly/compose_nmod_mpoly.c', + 'nmod_mpoly/compose_nmod_mpoly_gen.c', + 'nmod_mpoly/compose_nmod_mpoly_geobucket.c', + 'nmod_mpoly/compose_nmod_mpoly_horner.c', + 'nmod_mpoly/compose_nmod_poly.c', + 'nmod_mpoly/content_vars.c', + 'nmod_mpoly/ctx.c', + 'nmod_mpoly/deflate.c', + 'nmod_mpoly/deflation.c', + 'nmod_mpoly/degrees.c', + 'nmod_mpoly/derivative.c', + 'nmod_mpoly/discriminant.c', + 'nmod_mpoly/div.c', + 'nmod_mpoly/divides.c', + 'nmod_mpoly/divides_dense.c', + 'nmod_mpoly/divides_heap_threaded.c', + 'nmod_mpoly/divides_monagan_pearce.c', + 'nmod_mpoly/div_monagan_pearce.c', + 'nmod_mpoly/divrem.c', + 'nmod_mpoly/divrem_ideal.c', + 'nmod_mpoly/divrem_ideal_monagan_pearce.c', + 'nmod_mpoly/divrem_monagan_pearce.c', + 'nmod_mpoly/equal.c', + 'nmod_mpoly/evaluate_all.c', + 'nmod_mpoly/evaluate_one.c', + 'nmod_mpoly_factor/append.c', + 'nmod_mpoly_factor/clear.c', + 'nmod_mpoly_factor/cmp.c', + 'nmod_mpoly_factor/compression.c', + 'nmod_mpoly_factor/eval.c', + 'nmod_mpoly_factor/expand.c', + 'nmod_mpoly_factor/factor.c', + 'nmod_mpoly_factor/factor_content.c', + 'nmod_mpoly_factor/factor_squarefree.c', + 'nmod_mpoly_factor/fit_length.c', + 'nmod_mpoly_factor/gcd_zippel.c', + 'nmod_mpoly_factor/get_set.c', + 'nmod_mpoly_factor/init.c', + 'nmod_mpoly_factor/inlines.c', + 'nmod_mpoly_factor/io.c', + 'nmod_mpoly_factor/irred_lgprime.c', + 'nmod_mpoly_factor/irred_medprime.c', + 'nmod_mpoly_factor/irred_smprime_wang.c', + 'nmod_mpoly_factor/irred_smprime_zassenhaus.c', + 'nmod_mpoly_factor/irred_smprime_zippel.c', + 'nmod_mpoly_factor/lcc_wang.c', + 'nmod_mpoly_factor/mpoly_hlift.c', + 'nmod_mpoly_factor/mpoly_hlift_zippel.c', + 'nmod_mpoly_factor/mpoly_pfrac.c', + 'nmod_mpoly_factor/mpolyu.c', + 'nmod_mpoly_factor/mpolyv.c', + 'nmod_mpoly_factor/n_bpoly_mod.c', + 'nmod_mpoly_factor/n_bpoly_mod_factor_lgprime.c', + 'nmod_mpoly_factor/n_bpoly_mod_factor_smprime.c', + 'nmod_mpoly_factor/n_bpoly_mod_hlift.c', + 'nmod_mpoly_factor/n_bpoly_mod_pfrac.c', + 'nmod_mpoly_factor/nmod_mat_extras.c', + 'nmod_mpoly_factor/n_poly_vec.c', + 'nmod_mpoly_factor/polyu3_mod_hlift.c', + 'nmod_mpoly_factor/polyun.c', + 'nmod_mpoly_factor/realloc.c', + 'nmod_mpoly_factor/sort.c', + 'nmod_mpoly_factor/zip_helpers.c', + 'nmod_mpoly/fit_length.c', + 'nmod_mpoly/gcd_brown.c', + 'nmod_mpoly/gcd.c', + 'nmod_mpoly/gcd_cofactors.c', + 'nmod_mpoly/gcd_hensel.c', + 'nmod_mpoly/gcd_zippel2.c', + 'nmod_mpoly/gcd_zippel.c', + 'nmod_mpoly/gen.c', + 'nmod_mpoly/geobuckets.c', + 'nmod_mpoly/get_coeff.c', + 'nmod_mpoly/get_set_is_nmod_poly.c', + 'nmod_mpoly/get_str_pretty.c', + 'nmod_mpoly/get_term.c', + 'nmod_mpoly/get_term_coeff_ui.c', + 'nmod_mpoly/get_term_exp.c', + 'nmod_mpoly/get_term_monomial.c', + 'nmod_mpoly/get_term_ui_fmpz.c', + 'nmod_mpoly/get_term_ui_ui.c', + 'nmod_mpoly/get_term_var_exp.c', + 'nmod_mpoly/get_ui.c', + 'nmod_mpoly/inflate.c', + 'nmod_mpoly/init.c', + 'nmod_mpoly/inlines.c', + 'nmod_mpoly/interp.c', + 'nmod_mpoly/io.c', + 'nmod_mpoly/is_canonical.c', + 'nmod_mpoly/is_gen.c', + 'nmod_mpoly/is_ui.c', + 'nmod_mpoly/lead_coeff_vars.c', + 'nmod_mpoly/make_monic.c', + 'nmod_mpoly/mpolyd.c', + 'nmod_mpoly/mpolyn.c', + 'nmod_mpoly/mpolyn_divides_threaded.c', + 'nmod_mpoly/mpolyn_gcd_brown.c', + 'nmod_mpoly/mpolyu.c', + 'nmod_mpoly/mpolyu_divides.c', + 'nmod_mpoly/mpolyu_gcdp_zippel.c', + 'nmod_mpoly/mpolyun.c', + 'nmod_mpoly/mpolyun_divides.c', + 'nmod_mpoly/mul_array.c', + 'nmod_mpoly/mul_array_threaded.c', + 'nmod_mpoly/mul.c', + 'nmod_mpoly/mul_dense.c', + 'nmod_mpoly/mul_heap_threaded.c', + 'nmod_mpoly/mul_johnson.c', + 'nmod_mpoly/neg.c', + 'nmod_mpoly/pow_fmpz.c', + 'nmod_mpoly/pow_rmul.c', + 'nmod_mpoly/pow_ui.c', + 'nmod_mpoly/push_term.c', + 'nmod_mpoly/quadratic_root.c', + 'nmod_mpoly/randtest.c', + 'nmod_mpoly/realloc.c', + 'nmod_mpoly/repack_bits.c', + 'nmod_mpoly/resize.c', + 'nmod_mpoly/resultant.c', + 'nmod_mpoly/reverse.c', + 'nmod_mpoly/scalar.c', + 'nmod_mpoly/set.c', + 'nmod_mpoly/set_coeff.c', + 'nmod_mpoly/set_fmpz.c', + 'nmod_mpoly/setform.c', + 'nmod_mpoly/set_str_pretty.c', + 'nmod_mpoly/set_term_coeff_ui.c', + 'nmod_mpoly/set_term_exp.c', + 'nmod_mpoly/sort_terms.c', + 'nmod_mpoly/sqrt_heap.c', + 'nmod_mpoly/stack.c', + 'nmod_mpoly/sub.c', + 'nmod_mpoly/sub_ui.c', + 'nmod_mpoly/term_content.c', + 'nmod_mpoly/term_exp_fits.c', + 'nmod_mpoly/to_from_nmod_poly.c', + 'nmod_mpoly/univar.c', + 'nmod_mpoly/void_ring.c', + 'nmod_poly/add.c', + 'nmod_poly/add_series.c', + 'nmod_poly/add_ui.c', + 'nmod_poly/asinh_series.c', + 'nmod_poly/asin_series.c', + 'nmod_poly/atanh_series.c', + 'nmod_poly/atan_series.c', + 'nmod_poly/berlekamp_massey.c', + 'nmod_poly/bit_pack.c', + 'nmod_poly/bit_unpack.c', + 'nmod_poly/clear.c', + 'nmod_poly/compose.c', + 'nmod_poly/compose_horner.c', + 'nmod_poly/compose_mod_brent_kung.c', + 'nmod_poly/compose_mod_brent_kung_precomp_preinv.c', + 'nmod_poly/compose_mod_brent_kung_preinv.c', + 'nmod_poly/compose_mod_brent_kung_vec_preinv.c', + 'nmod_poly/compose_mod_brent_kung_vec_preinv_threaded.c', + 'nmod_poly/compose_mod.c', + 'nmod_poly/compose_mod_horner.c', + 'nmod_poly/compose_series.c', + 'nmod_poly/conway.c', + 'nmod_poly/conway_polynomial_data.c', + 'nmod_poly/cosh_series.c', + 'nmod_poly/cos_series.c', + 'nmod_poly/deflate.c', + 'nmod_poly/deflation.c', + 'nmod_poly/derivative.c', + 'nmod_poly/discriminant.c', + 'nmod_poly/div.c', + 'nmod_poly/divexact.c', + 'nmod_poly/divides.c', + 'nmod_poly/div_newton_n_preinv.c', + 'nmod_poly/divrem_basecase.c', + 'nmod_poly/divrem.c', + 'nmod_poly/divrem_newton_n_preinv.c', + 'nmod_poly/div_root.c', + 'nmod_poly/div_series.c', + 'nmod_poly/equal.c', + 'nmod_poly/equal_trunc.c', + 'nmod_poly/evaluate_mat.c', + 'nmod_poly/evaluate_nmod.c', + 'nmod_poly/evaluate_nmod_vec.c', + 'nmod_poly/exp_series.c', + 'nmod_poly_factor/clear.c', + 'nmod_poly_factor/concat.c', + 'nmod_poly_factor/factor_berlekamp.c', + 'nmod_poly_factor/factor.c', + 'nmod_poly_factor/factor_cantor_zassenhaus.c', + 'nmod_poly_factor/factor_distinct_deg.c', + 'nmod_poly_factor/factor_distinct_deg_threaded.c', + 'nmod_poly_factor/factor_equal_deg.c', + 'nmod_poly_factor/factor_equal_deg_prob.c', + 'nmod_poly_factor/factor_kaltofen_shoup.c', + 'nmod_poly_factor/factor_squarefree.c', + 'nmod_poly_factor/fit_length.c', + 'nmod_poly_factor/get_poly.c', + 'nmod_poly_factor/init.c', + 'nmod_poly_factor/inlines.c', + 'nmod_poly_factor/insert.c', + 'nmod_poly_factor/is_irreducible.c', + 'nmod_poly_factor/is_squarefree.c', + 'nmod_poly_factor/pow.c', + 'nmod_poly_factor/print.c', + 'nmod_poly_factor/realloc.c', + 'nmod_poly_factor/roots.c', + 'nmod_poly_factor/roots_factored.c', + 'nmod_poly_factor/set.c', + 'nmod_poly/find_distinct_nonzero_roots.c', + 'nmod_poly/fit_length.c', + 'nmod_poly/gcd.c', + 'nmod_poly/gcdinv.c', + 'nmod_poly/get_str.c', + 'nmod_poly/hgcd.c', + 'nmod_poly/inflate.c', + 'nmod_poly/init.c', + 'nmod_poly/inlines.c', + 'nmod_poly/integral.c', + 'nmod_poly/interpolate_nmod_vec.c', + 'nmod_poly/invmod.c', + 'nmod_poly/inv_series.c', + 'nmod_poly/inv_series_newton.c', + 'nmod_poly/invsqrt_series.c', + 'nmod_poly/io.c', + 'nmod_poly/KS2_pack.c', + 'nmod_poly/KS2_reduce.c', + 'nmod_poly/KS2_unpack.c', + 'nmod_poly/log_series.c', + 'nmod_poly/make_monic.c', + 'nmod_poly_mat/add.c', + 'nmod_poly_mat/clear.c', + 'nmod_poly_mat/concat.c', + 'nmod_poly_mat/det.c', + 'nmod_poly_mat/equal.c', + 'nmod_poly_mat/evaluate_nmod.c', + 'nmod_poly_mat/fflu.c', + 'nmod_poly_mat/find_pivot_any.c', + 'nmod_poly_mat/find_pivot_partial.c', + 'nmod_poly_mat/get_set_coeff_mat.c', + 'nmod_poly_mat/init.c', + 'nmod_poly_mat/init_set.c', + 'nmod_poly_mat/inlines.c', + 'nmod_poly_mat/inv.c', + 'nmod_poly_mat/is_one.c', + 'nmod_poly_mat/is_zero.c', + 'nmod_poly_mat/max_length.c', + 'nmod_poly_mat/mul.c', + 'nmod_poly_mat/mul_classical.c', + 'nmod_poly_mat/mul_interpolate.c', + 'nmod_poly_mat/mul_KS.c', + 'nmod_poly_mat/neg.c', + 'nmod_poly_mat/nullspace.c', + 'nmod_poly_mat/one.c', + 'nmod_poly_mat/pow.c', + 'nmod_poly_mat/print.c', + 'nmod_poly_mat/rand.c', + 'nmod_poly_mat/rank.c', + 'nmod_poly_mat/rref.c', + 'nmod_poly_mat/scalar.c', + 'nmod_poly_mat/set.c', + 'nmod_poly_mat/set_trunc.c', + 'nmod_poly_mat/shift_left_right.c', + 'nmod_poly_mat/solve.c', + 'nmod_poly_mat/solve_fflu.c', + 'nmod_poly_mat/solve_fflu_precomp.c', + 'nmod_poly_mat/sqr.c', + 'nmod_poly_mat/sub.c', + 'nmod_poly_mat/trace.c', + 'nmod_poly_mat/window.c', + 'nmod_poly_mat/zero.c', + 'nmod_poly/max_bits.c', + 'nmod_poly/mul.c', + 'nmod_poly/mul_classical.c', + 'nmod_poly/mulhigh.c', + 'nmod_poly/mulhigh_classical.c', + 'nmod_poly/mul_KS2.c', + 'nmod_poly/mul_KS4.c', + 'nmod_poly/mul_KS.c', + 'nmod_poly/mullow.c', + 'nmod_poly/mullow_classical.c', + 'nmod_poly/mullow_KS.c', + 'nmod_poly/mulmod.c', + 'nmod_poly/mulmod_preinv.c', + 'nmod_poly/multi_crt.c', + 'nmod_poly/neg.c', + 'nmod_poly/pow_binexp.c', + 'nmod_poly/pow.c', + 'nmod_poly/powers_mod.c', + 'nmod_poly/power_sums.c', + 'nmod_poly/power_sums_to_poly.c', + 'nmod_poly/powmod_binexp.c', + 'nmod_poly/powmod_binexp_preinv.c', + 'nmod_poly/powmod_x_preinv.c', + 'nmod_poly/pow_trunc.c', + 'nmod_poly/product_roots_nmod_vec.c', + 'nmod_poly/randtest.c', + 'nmod_poly/randtest_monic_primitive.c', + 'nmod_poly/realloc.c', + 'nmod_poly/rem.c', + 'nmod_poly/remove.c', + 'nmod_poly/resultant.c', + 'nmod_poly/reverse.c', + 'nmod_poly/revert_series.c', + 'nmod_poly/scalar.c', + 'nmod_poly/set_coeff_ui.c', + 'nmod_poly/set_str.c', + 'nmod_poly/set_trunc.c', + 'nmod_poly/shift_left_right.c', + 'nmod_poly/sinh_series.c', + 'nmod_poly/sin_series.c', + 'nmod_poly/sqrt.c', + 'nmod_poly/sqrt_series.c', + 'nmod_poly/sub.c', + 'nmod_poly/sub_series.c', + 'nmod_poly/sub_ui.c', + 'nmod_poly/tanh_series.c', + 'nmod_poly/tan_series.c', + 'nmod_poly/taylor_shift.c', + 'nmod_poly/tree.c', + 'nmod_poly/xgcd.c', + 'nmod_vec/add.c', + 'nmod_vec/discrete_log_pohlig_hellman.c', + 'nmod_vec/dot.c', + 'nmod_vec/inlines.c', + 'nmod_vec/io.c', + 'nmod_vec/max_bits.c', + 'nmod_vec/neg.c', + 'nmod_vec/randtest.c', + 'nmod_vec/reduce.c', + 'nmod_vec/scalar.c', + 'nmod_vec/sub.c', + 'n_poly/io.c', + 'n_poly/n_bpoly.c', + 'n_poly/n_bpoly_mod.c', + 'n_poly/n_bpoly_mod_gcd.c', + 'n_poly/n_bpoly_stack.c', + 'n_poly/n_fq_bpoly.c', + 'n_poly/n_fq_bpoly_gcd.c', + 'n_poly/n_fq_bpoly_taylor_shift.c', + 'n_poly/n_fq.c', + 'n_poly/n_fq_poly_add.c', + 'n_poly/n_fq_poly_add_si.c', + 'n_poly/n_fq_poly.c', + 'n_poly/n_fq_poly_divrem.c', + 'n_poly/n_fq_poly_gcd.c', + 'n_poly/n_fq_poly_inv_series.c', + 'n_poly/n_fq_poly_mul.c', + 'n_poly/n_fq_poly_mullow.c', + 'n_poly/n_fq_poly_mulmod.c', + 'n_poly/n_fq_poly_neg.c', + 'n_poly/n_fq_poly_pow.c', + 'n_poly/n_fq_poly_rem.c', + 'n_poly/n_fq_poly_sub.c', + 'n_poly/n_fq_polyun.c', + 'n_poly/n_fq_poly_xgcd.c', + 'n_poly/n_fq_pow_cache.c', + 'n_poly/nmod_n_fq_interp.c', + 'n_poly/nmod_pow_cache.c', + 'n_poly/n_poly.c', + 'n_poly/n_poly_mod.c', + 'n_poly/n_poly_stack.c', + 'n_poly/n_polyu1n_gcd.c', + 'n_poly/n_polyu.c', + 'n_poly/n_polyun.c', + 'n_poly/n_polyun_stack.c', + 'n_poly/n_tpoly.c', + 'n_poly/zippel_helpers.c', + 'padic/add.c', + 'padic/clear.c', + 'padic/ctx_clear.c', + 'padic/ctx_init.c', + 'padic/div.c', + 'padic/exp_balanced.c', + 'padic/exp.c', + 'padic/exp_rectangular.c', + 'padic/get_fmpq.c', + 'padic/get_fmpz.c', + 'padic/get_mpq.c', + 'padic/get_mpz.c', + 'padic/get_str.c', + 'padic/init.c', + 'padic/inlines.c', + 'padic/inv.c', + 'padic/io.c', + 'padic/lifts.c', + 'padic/log_balanced.c', + 'padic/log.c', + 'padic/log_rectangular.c', + 'padic/log_satoh.c', + 'padic_mat/add.c', + 'padic_mat/canonicalise.c', + 'padic_mat/clear.c', + 'padic_mat/equal.c', + 'padic_mat/get_entry_padic.c', + 'padic_mat/get_fmpq_mat.c', + 'padic_mat/init.c', + 'padic_mat/inlines.c', + 'padic_mat/io.c', + 'padic_mat/is_canonical.c', + 'padic_mat/is_reduced.c', + 'padic_mat/is_zero.c', + 'padic_mat/mul.c', + 'padic_mat/neg.c', + 'padic_mat/one.c', + 'padic_mat/randtest.c', + 'padic_mat/reduce.c', + 'padic_mat/scalar.c', + 'padic_mat/set.c', + 'padic_mat/set_entry_padic.c', + 'padic_mat/set_fmpq_mat.c', + 'padic_mat/sub.c', + 'padic_mat/swap.c', + 'padic_mat/transpose.c', + 'padic_mat/zero.c', + 'padic/mul.c', + 'padic/neg.c', + 'padic_poly/add.c', + 'padic_poly/canonicalise.c', + 'padic_poly/clear.c', + 'padic_poly/compose.c', + 'padic_poly/compose_pow.c', + 'padic_poly/derivative.c', + 'padic_poly/equal.c', + 'padic_poly/evaluate_padic.c', + 'padic_poly/fit_length.c', + 'padic_poly/get_coeff_padic.c', + 'padic_poly/get_fmpq_poly.c', + 'padic_poly/get_fmpz_poly.c', + 'padic_poly/init.c', + 'padic_poly/inlines.c', + 'padic_poly/inv_series.c', + 'padic_poly/io.c', + 'padic_poly/is_canonical.c', + 'padic_poly/is_reduced.c', + 'padic_poly/mul.c', + 'padic_poly/neg.c', + 'padic_poly/normalise.c', + 'padic_poly/pow.c', + 'padic_poly/randtest.c', + 'padic_poly/realloc.c', + 'padic_poly/reduce.c', + 'padic_poly/scalar_mul_padic.c', + 'padic_poly/set.c', + 'padic_poly/set_coeff_padic.c', + 'padic_poly/set_fmpq.c', + 'padic_poly/set_fmpq_poly.c', + 'padic_poly/set_fmpz.c', + 'padic_poly/set_fmpz_poly.c', + 'padic_poly/set_padic.c', + 'padic_poly/set_si.c', + 'padic_poly/set_ui.c', + 'padic_poly/shift_left.c', + 'padic_poly/shift_right.c', + 'padic_poly/sub.c', + 'padic_poly/swap.c', + 'padic/pow_si.c', + 'padic/randtest.c', + 'padic/reduce.c', + 'padic/set.c', + 'padic/set_fmpq.c', + 'padic/set_fmpz.c', + 'padic/set_mpq.c', + 'padic/set_mpz.c', + 'padic/set_si.c', + 'padic/set_ui.c', + 'padic/shift.c', + 'padic/sqrt.c', + 'padic/sub.c', + 'padic/teichmuller.c', + 'padic/val_fac.c', + 'partitions/fmpz_fmpz.c', + 'partitions/hrr_sum_arb.c', + 'partitions/leading_fmpz.c', + 'partitions/rademacher_bound.c', + 'perm/inlines.c', + 'perm/parity.c', + 'perm/randtest.c', + 'qadic/ctx_clear.c', + 'qadic/ctx_init.c', + 'qadic/exp_balanced.c', + 'qadic/exp.c', + 'qadic/exp_rectangular.c', + 'qadic/frobenius.c', + 'qadic/inlines.c', + 'qadic/inv.c', + 'qadic/io.c', + 'qadic/log_balanced.c', + 'qadic/log.c', + 'qadic/log_rectangular.c', + 'qadic/mul.c', + 'qadic/norm_analytic.c', + 'qadic/norm.c', + 'qadic/norm_resultant.c', + 'qadic/pow.c', + 'qadic/set_fmpz_poly.c', + 'qadic/sqrt.c', + 'qadic/teichmuller.c', + 'qadic/trace.c', + 'qfb/exponent.c', + 'qfb/exponent_element.c', + 'qfb/exponent_grh.c', + 'qfb/hash_clear.c', + 'qfb/hash_find.c', + 'qfb/hash_init.c', + 'qfb/hash_insert.c', + 'qfb/inlines.c', + 'qfb/io.c', + 'qfb/is_reduced.c', + 'qfb/nucomp.c', + 'qfb/nudupl.c', + 'qfb/pow.c', + 'qfb/pow_ui.c', + 'qfb/prime_form.c', + 'qfb/reduce.c', + 'qfb/reduced_forms.c', + 'qqbar/abs2.c', + 'qqbar/abs.c', + 'qqbar/acb_lindep.c', + 'qqbar/acos_pi.c', + 'qqbar/acot_pi.c', + 'qqbar/acsc_pi.c', + 'qqbar/add.c', + 'qqbar/affine_transform.c', + 'qqbar/asec_pi.c', + 'qqbar/asin_pi.c', + 'qqbar/atan_pi.c', + 'qqbar/cache_enclosure.c', + 'qqbar/ceil.c', + 'qqbar/clear.c', + 'qqbar/cmpabs.c', + 'qqbar/cmpabs_im.c', + 'qqbar/cmpabs_re.c', + 'qqbar/cmp_im.c', + 'qqbar/cmp_re.c', + 'qqbar/cmp_root_order.c', + 'qqbar/composed_op.c', + 'qqbar/conj.c', + 'qqbar/conjugates.c', + 'qqbar/cos_pi.c', + 'qqbar/cot_pi.c', + 'qqbar/csc_pi.c', + 'qqbar/csgn.c', + 'qqbar/denominator.c', + 'qqbar/div.c', + 'qqbar/eigenvalues_fmpq_mat.c', + 'qqbar/eigenvalues_fmpz_mat.c', + 'qqbar/enclosure_raw.c', + 'qqbar/equal.c', + 'qqbar/equal_fmpq_poly_val.c', + 'qqbar/evaluate_fmpq_poly.c', + 'qqbar/evaluate_fmpz_mpoly.c', + 'qqbar/evaluate_fmpz_poly.c', + 'qqbar/exp_pi_i.c', + 'qqbar/express_in_field.c', + 'qqbar/floor.c', + 'qqbar/fmpq_pow_si_ui.c', + 'qqbar/fmpq_root_ui.c', + 'qqbar/get_acb.c', + 'qqbar/get_arb.c', + 'qqbar/get_arb_im.c', + 'qqbar/get_arb_re.c', + 'qqbar/get_fexpr.c', + 'qqbar/get_fmpq.c', + 'qqbar/get_fmpz.c', + 'qqbar/get_quadratic.c', + 'qqbar/guess.c', + 'qqbar/hash.c', + 'qqbar/height_bits.c', + 'qqbar/height.c', + 'qqbar/i.c', + 'qqbar/im.c', + 'qqbar/init.c', + 'qqbar/inlines.c', + 'qqbar/inv.c', + 'qqbar/log_pi_i.c', + 'qqbar/mul_2exp_si.c', + 'qqbar/mul.c', + 'qqbar/neg.c', + 'qqbar/numerator.c', + 'qqbar/phi.c', + 'qqbar/pow.c', + 'qqbar/print.c', + 'qqbar/printn.c', + 'qqbar/randtest.c', + 'qqbar/re.c', + 'qqbar/re_im.c', + 'qqbar/root_of_unity.c', + 'qqbar/roots_fmpq_poly.c', + 'qqbar/roots_fmpz_poly.c', + 'qqbar/roots_poly_squarefree.c', + 'qqbar/root_ui.c', + 'qqbar/sec_pi.c', + 'qqbar/set.c', + 'qqbar/set_d.c', + 'qqbar/set_fexpr.c', + 'qqbar/set_fmpq.c', + 'qqbar/set_fmpz.c', + 'qqbar/set_re_im.c', + 'qqbar/set_re_im_d.c', + 'qqbar/set_si.c', + 'qqbar/set_ui.c', + 'qqbar/sgn.c', + 'qqbar/sgn_im.c', + 'qqbar/sgn_re.c', + 'qqbar/sin_pi.c', + 'qqbar/sub.c', + 'qqbar/swap.c', + 'qqbar/tan_pi.c', + 'qqbar/validate_enclosure.c', + 'qqbar/write.c', + 'qsieve/block_lanczos.c', + 'qsieve/clear.c', + 'qsieve/collect_relations.c', + 'qsieve/compute_poly_data.c', + 'qsieve/factor.c', + 'qsieve/init.c', + 'qsieve/knuth_schroeppel.c', + 'qsieve/large_prime_variant.c', + 'qsieve/linalg.c', + 'qsieve/poly.c', + 'qsieve/primes_init.c', + 'qsieve/square_root.c', + 'test/main.c', + 'thread_pool/clear.c', + 'thread_pool/distribute_work.c', + 'thread_pool/find_work.c', + 'thread_pool/get_size.c', + 'thread_pool/give_back.c', + 'thread_pool/init.c', + 'thread_pool/request.c', + 'thread_pool/restore_affinity.c', + 'thread_pool/set_affinity.c', + 'thread_pool/set_size.c', + 'thread_pool/wait.c', + 'thread_pool/wake.c', + 'thread_support/get_num_available_threads.c', + 'thread_support/thread_support.c', + 'ulong_extras/cbrt.c', + 'ulong_extras/cleanup_primes.c', + 'ulong_extras/clog.c', + 'ulong_extras/compute_primes.c', + 'ulong_extras/CRT.c', + 'ulong_extras/discrete_log_bsgs.c', + 'ulong_extras/div2_preinv.c', + 'ulong_extras/divides.c', + 'ulong_extras/divrem2_precomp.c', + 'ulong_extras/divrem2_preinv.c', + 'ulong_extras/euler_phi.c', + 'ulong_extras/factor.c', + 'ulong_extras/factor_ecm.c', + 'ulong_extras/factorial_fast_mod2_preinv.c', + 'ulong_extras/factorial_mod2_preinv.c', + 'ulong_extras/factor_insert.c', + 'ulong_extras/factor_lehman.c', + 'ulong_extras/factor_one_line.c', + 'ulong_extras/factor_partial.c', + 'ulong_extras/factor_pollard_brent.c', + 'ulong_extras/factor_power235.c', + 'ulong_extras/factor_pp1.c', + 'ulong_extras/factor_SQUFOF.c', + 'ulong_extras/factor_trial.c', + 'ulong_extras/flog.c', + 'ulong_extras/gcdinv.c', + 'ulong_extras/inlines.c', + 'ulong_extras/is_oddprime.c', + 'ulong_extras/is_perfect_power235.c', + 'ulong_extras/is_perfect_power.c', + 'ulong_extras/is_prime.c', + 'ulong_extras/is_probabprime.c', + 'ulong_extras/is_square.c', + 'ulong_extras/is_squarefree.c', + 'ulong_extras/is_strong_probabprime2_preinv.c', + 'ulong_extras/is_strong_probabprime_precomp.c', + 'ulong_extras/jacobi.c', + 'ulong_extras/lll_mod_preinv.c', + 'ulong_extras/ll_mod_preinv.c', + 'ulong_extras/mod2_precomp.c', + 'ulong_extras/mod2_preinv.c', + 'ulong_extras/mod_precomp.c', + 'ulong_extras/moebius_mu.c', + 'ulong_extras/mulmod_precomp.c', + 'ulong_extras/mulmod_precomp_shoup.c', + 'ulong_extras/mulmod_preinv.c', + 'ulong_extras/nextprime.c', + 'ulong_extras/nth_prime.c', + 'ulong_extras/pow.c', + 'ulong_extras/powmod2_preinv.c', + 'ulong_extras/powmod2_ui_preinv.c', + 'ulong_extras/powmod_precomp.c', + 'ulong_extras/powmod_ui_preinv.c', + 'ulong_extras/preinvert_limb.c', + 'ulong_extras/prime_inverses_arr_readonly.c', + 'ulong_extras/prime_pi_bounds.c', + 'ulong_extras/prime_pi.c', + 'ulong_extras/primes_arr_readonly.c', + 'ulong_extras/primes_clear.c', + 'ulong_extras/primes_extend_small.c', + 'ulong_extras/primes_init.c', + 'ulong_extras/primes_jump_after.c', + 'ulong_extras/primes_next.c', + 'ulong_extras/primes_sieve_range.c', + 'ulong_extras/primitive_root_prime.c', + 'ulong_extras/randomisation.c', + 'ulong_extras/remove2_precomp.c', + 'ulong_extras/remove.c', + 'ulong_extras/revbin.c', + 'ulong_extras/root.c', + 'ulong_extras/root_estimate.c', + 'ulong_extras/rootrem.c', + 'ulong_extras/sizeinbase.c', + 'ulong_extras/sqrt.c', + 'ulong_extras/sqrtmod.c', + 'ulong_extras/sqrtmodn.c', + 'ulong_extras/sqrtmod_primepow.c', + 'ulong_extras/sqrtrem.c', + 'ulong_extras/xgcd.c', +] From eb28e40297a3a197f51c76c55fb6a9bcc8b51c40 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 8 Apr 2024 01:29:59 +0100 Subject: [PATCH 002/104] Add missing headers --- src/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meson.build b/src/meson.build index 5349ceac93..66c0451ab9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,4 +1,8 @@ headers = [ + 'flint.h', + 'flint-config.h', + 'gmpcompat.h', + # 'acb_calc.h', 'acb_dft.h', 'acb_dirichlet.h', From e54ccfafe1fc89d416e3a36f296fe71439019a7f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 8 Apr 2024 16:08:38 +0100 Subject: [PATCH 003/104] build: actually install libflint --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index ae7cd95a15..1169a801be 100644 --- a/meson.build +++ b/meson.build @@ -28,6 +28,7 @@ install_headers(headers_all, subdir: 'flint') libflint = library('flint', c_files_all, dependencies: flint_deps, include_directories: include_directories('src'), + install: true ) pkg_mod = import('pkgconfig') From b68227766a56930c507c340ced7f4efa5a5f5361 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 8 Apr 2024 17:46:36 +0100 Subject: [PATCH 004/104] build: use release as the default buildtype --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1169a801be..6a73b0dbea 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,7 @@ project('FLINT', 'c', version: '3.1.0', - license: 'LGPL3+' + license: 'LGPL3+', + default_options: ['buildtype=release'], ) cc = meson.get_compiler('c') From 5caf5fc0d76a780a375fec1e9623eb409c0fa1ce Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 11 Apr 2024 18:45:02 +0100 Subject: [PATCH 005/104] build: build fft_small and assembly with meson --- detection/meson.build | 133 ++++++++++++++++++++++++++++++++++++++++++ meson.build | 21 ++++++- meson.options | 4 ++ src/meson.build | 3 +- 4 files changed, 159 insertions(+), 2 deletions(-) create mode 100644 detection/meson.build create mode 100644 meson.options diff --git a/detection/meson.build b/detection/meson.build new file mode 100644 index 0000000000..9310f76348 --- /dev/null +++ b/detection/meson.build @@ -0,0 +1,133 @@ + +fft_small_opt = get_option('fft_small') + +# check for headers used by fft_small +has_avx = cc.has_header('immintrin.h') +has_neon = cc.has_header('arm_neon.h') + +fft_small_supported = has_avx or has_neon + +# Error if fft_small enabled but not possible, otherwise disable if auto +fft_small_opt = fft_small_opt.require(fft_small_supported, + error_message: 'host CPU does not support AVX/NEON. Set fft_small to disabled or auto') + +# If fft_small was auto we enable it if possible +fft_small_opt = fft_small_opt.enable_auto_if(fft_small_supported) +have_fft_small = fft_small_opt.enabled() + +message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') + +if have_fft_small + cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, + description: 'Define to use the fft_small module') +endif + +if have_fft_small + c_files_all += [ + 'src/fft_small/default_ctx.c', + 'src/fft_small/fmpz_poly_mul.c', + 'src/fft_small/mpn_helpers.c', + 'src/fft_small/mpn_mul.c', + 'src/fft_small/mulmod_statisfies_bounds.c', + 'src/fft_small/nmod_poly_mul.c', + 'src/fft_small/sd_fft.c', + 'src/fft_small/sd_fft_ctx.c', + 'src/fft_small/sd_ifft.c', + ] + # Maybe fft_small.h should only be added conditionally as well... + # headers_all += ['src/fft_small.h'] +endif + +assembly_opt = get_option('assembly') + +# Might be better to check for known good operating systems rather than +# exclude known bad ones. +assembly_opt = assembly_opt.require(host_machine.system() != 'windows', + error_message: 'No assembly support for Windows') + +# Checking for assembly support needs to be more complicated than this. ARM +# needs to be v8 and not sure exactly what to check for x86_64. For now +# the checks below would attempt to build assembly on some systems that do not +# support it. The feature can be disabled with -Dassembly=disabled to build on +# those systems. +if host_machine.cpu_family() == 'aarch64' + assembly_cpu_supported = true + assembly_dir = 'arm64' + # FLINT_HAVE_ASSEMBLY_armv8 +elif host_machine.cpu_family() == 'x86_64' + assembly_cpu_supported = true + assembly_dir = 'x86_64/broadwell' + # FLINT_HAVE_ASSEMBLY_x86_64_adx +else + assembly_cpu_supported = false +endif + +assembly_opt = assembly_opt.require(assembly_cpu_supported, + error_message: 'No assembly support for host CPU') + +assembly_opt = assembly_opt.enable_auto_if(true) +have_assembly = assembly_opt.enabled() + +message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') + +if have_assembly + + asm_deps = [ + '../config.m4', + '../src/mpn_extras/asm-defs.m4', + ] + + if assembly_dir == 'arm64' + asm_files = [ + 'src/mpn_extras/arm64/mul_2.asm', + 'src/mpn_extras/arm64/mulhigh_hard.asm', + 'src/mpn_extras/arm64/mul_hard.asm', + 'src/mpn_extras/arm64/sqrhigh_hard.asm', + 'src/mpn_extras/arm64/mulhigh_basecase.asm', + 'src/mpn_extras/arm64/sqr_hard.asm', + ] + asm_deps += [ + '../src/mpn_extras/arm64/darwin.m4', + '../src/mpn_extras/arm64/arm64-defs.m4', + ] + elif assembly_dir == 'x86_64/broadwell' + asm_files = [ + 'src/mpn_extras/x86_64/broadwell/mullow_hard.asm', + 'src/mpn_extras/x86_64/broadwell/2add_n_inplace.asm', + 'src/mpn_extras/x86_64/broadwell/mulhigh_hard.asm', + 'src/mpn_extras/x86_64/broadwell/sqrhigh_basecase_odd.asm', + 'src/mpn_extras/x86_64/broadwell/mul_hard.asm', + 'src/mpn_extras/x86_64/broadwell/mulhigh_normalised_hard.asm', + 'src/mpn_extras/x86_64/broadwell/sqrhigh_hard.asm', + 'src/mpn_extras/x86_64/broadwell/mullow_basecase.asm', + 'src/mpn_extras/x86_64/broadwell/mulhigh_basecase.asm', + 'src/mpn_extras/x86_64/broadwell/sqrhigh_basecase_even.asm', + 'src/mpn_extras/x86_64/broadwell/sqr_hard.asm', + ] + asm_deps += [ + '../src/mpn_extras/x86_64/broadwell/x86_64-defs.m4', + ] + if host_machine.system() == 'darwin' + asm_deps += [ + '../src/mpn_extras/x86_64/broadwell/darwin.m4', + ] + endif + else + error('Unknown assembly_dir: ', assembly_dir) + endif + + m4_prog = find_program('m4', native: true) + + s_files = [] + foreach asm_file: asm_files + s_filename = fs.stem(asm_file) + '.s' + s_file = custom_target(s_filename, + input: ['..' / asm_file] + asm_deps, + output: s_filename, + command: [m4_prog, '-I..', '@INPUT0@'], + capture: true, + ) + s_files += [s_file] + endforeach + +endif diff --git a/meson.build b/meson.build index 6a73b0dbea..6499d81f46 100644 --- a/meson.build +++ b/meson.build @@ -1,10 +1,16 @@ project('FLINT', 'c', version: '3.1.0', license: 'LGPL3+', - default_options: ['buildtype=release'], + default_options: [ + 'buildtype=release', + 'c_std=c11', + ], ) cc = meson.get_compiler('c') +cfg_data = configuration_data() +fs = import('fs') + m_dep = cc.find_library('m', required: false) gmp_dep = dependency('gmp', version: '>= 6.2.1') @@ -12,6 +18,13 @@ mpfr_dep = dependency('mpfr', version: '>= 4.1.0') flint_deps = [gmp_dep, mpfr_dep, m_dep] +add_project_arguments( + '-DBUILDING_FLINT', + '-DFLINT_NOSTDIO', + '-DFLINT_NOSTDARG', + '-Werror=implicit-function-declaration', + language: 'c') + subdir('src') headers_all = [] @@ -24,6 +37,12 @@ foreach file : c_files_all_subdir c_files_all += ['src' / file] endforeach +subdir('detection') + +if have_assembly + c_files_all += s_files +endif + install_headers(headers_all, subdir: 'flint') libflint = library('flint', c_files_all, diff --git a/meson.options b/meson.options new file mode 100644 index 0000000000..7ccdc8e452 --- /dev/null +++ b/meson.options @@ -0,0 +1,4 @@ +option('fft_small', type : 'feature', value : 'auto', + description: 'Build the fft_small module') +option('assembly', type : 'feature', value : 'auto', + description: 'Use assembly code') diff --git a/src/meson.build b/src/meson.build index 66c0451ab9..d9d2ee86d3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1947,6 +1947,7 @@ c_files_all_subdir = [ 'fft/mul_truncate_sqrt2.c', 'fft/negmod_2expp1.c', 'fft/normmod_2expp1.c', + # These are added by detection/meson.build conditionally. #'fft_small/default_ctx.c', #'fft_small/fmpz_poly_mul.c', #'fft_small/mpn_helpers.c', @@ -5275,7 +5276,7 @@ c_files_all_subdir = [ 'qsieve/poly.c', 'qsieve/primes_init.c', 'qsieve/square_root.c', - 'test/main.c', + #'test/main.c', 'thread_pool/clear.c', 'thread_pool/distribute_work.c', 'thread_pool/find_work.c', From a96778369987a7364b4b295f6b158eda564ed86c Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 11 Apr 2024 21:23:00 +0100 Subject: [PATCH 006/104] build: build some tests with meson --- meson.build | 13 +++++++++++-- src/fmpq/test/meson.build | 8 ++++++++ src/fmpz/test/meson.build | 8 ++++++++ src/meson.build | 2 ++ src/ulong_extras/test/meson.build | 8 ++++++++ 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 src/fmpq/test/meson.build create mode 100644 src/fmpz/test/meson.build create mode 100644 src/ulong_extras/test/meson.build diff --git a/meson.build b/meson.build index 6499d81f46..614097dbab 100644 --- a/meson.build +++ b/meson.build @@ -23,7 +23,8 @@ add_project_arguments( '-DFLINT_NOSTDIO', '-DFLINT_NOSTDARG', '-Werror=implicit-function-declaration', - language: 'c') + language: 'c', +) subdir('src') @@ -48,9 +49,17 @@ install_headers(headers_all, subdir: 'flint') libflint = library('flint', c_files_all, dependencies: flint_deps, include_directories: include_directories('src'), - install: true + install: true, ) +subdir('src/fmpz/test') +subdir('src/fmpq/test') +# ulong_extras tests fails with linker error: +# Undefined symbols for architecture arm64: +# "_n_factor_evaluate", referenced from: +# _test_n_factor in main.c.o +#subdir('src/ulong_extras/test') + pkg_mod = import('pkgconfig') pkg_mod.generate( libraries: libflint, diff --git a/src/fmpq/test/meson.build b/src/fmpq/test/meson.build new file mode 100644 index 0000000000..fb6be84a32 --- /dev/null +++ b/src/fmpq/test/meson.build @@ -0,0 +1,8 @@ +test_exe = executable('main', + 'main.c', + dependencies: flint_deps, + link_with: libflint, + include_directories: src_inc, + install: false, +) +test(file, test_exe) diff --git a/src/fmpz/test/meson.build b/src/fmpz/test/meson.build new file mode 100644 index 0000000000..fb6be84a32 --- /dev/null +++ b/src/fmpz/test/meson.build @@ -0,0 +1,8 @@ +test_exe = executable('main', + 'main.c', + dependencies: flint_deps, + link_with: libflint, + include_directories: src_inc, + install: false, +) +test(file, test_exe) diff --git a/src/meson.build b/src/meson.build index d9d2ee86d3..7df02fb882 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,5 @@ +src_inc = include_directories('.') + headers = [ 'flint.h', 'flint-config.h', diff --git a/src/ulong_extras/test/meson.build b/src/ulong_extras/test/meson.build new file mode 100644 index 0000000000..fb6be84a32 --- /dev/null +++ b/src/ulong_extras/test/meson.build @@ -0,0 +1,8 @@ +test_exe = executable('main', + 'main.c', + dependencies: flint_deps, + link_with: libflint, + include_directories: src_inc, + install: false, +) +test(file, test_exe) From e9f22f36c1d4ad7f7f8a6113bcc94198fb71e062 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 12 Apr 2024 01:01:47 +0100 Subject: [PATCH 007/104] build: fix tests and add -Dtests=enabled option --- meson.build | 24 ++++++++++++++---------- meson.options | 2 ++ src/fmpq/test/meson.build | 2 +- src/fmpz/test/meson.build | 2 +- src/meson.build | 1 + src/ulong_extras/test/meson.build | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 614097dbab..4ce35d0cd8 100644 --- a/meson.build +++ b/meson.build @@ -19,9 +19,6 @@ mpfr_dep = dependency('mpfr', version: '>= 4.1.0') flint_deps = [gmp_dep, mpfr_dep, m_dep] add_project_arguments( - '-DBUILDING_FLINT', - '-DFLINT_NOSTDIO', - '-DFLINT_NOSTDARG', '-Werror=implicit-function-declaration', language: 'c', ) @@ -50,15 +47,22 @@ libflint = library('flint', c_files_all, dependencies: flint_deps, include_directories: include_directories('src'), install: true, + c_args: [ + '-DBUILDING_FLINT', + '-DFLINT_NOSTDIO', + '-DFLINT_NOSTDARG', + ] ) -subdir('src/fmpz/test') -subdir('src/fmpq/test') -# ulong_extras tests fails with linker error: -# Undefined symbols for architecture arm64: -# "_n_factor_evaluate", referenced from: -# _test_n_factor in main.c.o -#subdir('src/ulong_extras/test') +tests_opt = get_option('tests') +if tests_opt.enabled() + subdir('src/fmpz/test') + subdir('src/fmpq/test') + subdir('src/ulong_extras/test') +else + bad_test_exe = executable('bad_test', 'bad_test.c') + test('Need to build tests with -Dtests=enabled', bad_test_exe) +endif pkg_mod = import('pkgconfig') pkg_mod.generate( diff --git a/meson.options b/meson.options index 7ccdc8e452..64a30b276c 100644 --- a/meson.options +++ b/meson.options @@ -1,3 +1,5 @@ +option('tests', type : 'feature', value : 'disabled', + description: 'Build the tests') option('fft_small', type : 'feature', value : 'auto', description: 'Build the fft_small module') option('assembly', type : 'feature', value : 'auto', diff --git a/src/fmpq/test/meson.build b/src/fmpq/test/meson.build index fb6be84a32..83d3d4e26f 100644 --- a/src/fmpq/test/meson.build +++ b/src/fmpq/test/meson.build @@ -5,4 +5,4 @@ test_exe = executable('main', include_directories: src_inc, install: false, ) -test(file, test_exe) +test('fmpq', test_exe) diff --git a/src/fmpz/test/meson.build b/src/fmpz/test/meson.build index fb6be84a32..16a97f6a1f 100644 --- a/src/fmpz/test/meson.build +++ b/src/fmpz/test/meson.build @@ -5,4 +5,4 @@ test_exe = executable('main', include_directories: src_inc, install: false, ) -test(file, test_exe) +test('fmpz', test_exe) diff --git a/src/meson.build b/src/meson.build index 7df02fb882..ace3589521 100644 --- a/src/meson.build +++ b/src/meson.build @@ -5306,6 +5306,7 @@ c_files_all_subdir = [ 'ulong_extras/euler_phi.c', 'ulong_extras/factor.c', 'ulong_extras/factor_ecm.c', + 'ulong_extras/factor_misc.c', 'ulong_extras/factorial_fast_mod2_preinv.c', 'ulong_extras/factorial_mod2_preinv.c', 'ulong_extras/factor_insert.c', diff --git a/src/ulong_extras/test/meson.build b/src/ulong_extras/test/meson.build index fb6be84a32..d9ae8dd9a1 100644 --- a/src/ulong_extras/test/meson.build +++ b/src/ulong_extras/test/meson.build @@ -5,4 +5,4 @@ test_exe = executable('main', include_directories: src_inc, install: false, ) -test(file, test_exe) +test('ulong_extras', test_exe) From 013a37bd08e84079ed8bd80ff93ff27328929f62 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 13 Apr 2024 20:12:21 +0100 Subject: [PATCH 008/104] build: make meson build files with meson_boostrap --- .gitignore | 3 + _meson_build/Makefile | 20 + _meson_build/bad_test.c | 10 + _meson_build/generate_meson_build.py | 276 + meson.build => _meson_build/meson.build | 19 +- meson.options => _meson_build/meson.options | 0 meson_bootstrap.py | 10 + src/fmpq/test/meson.build | 8 - src/fmpz/test/meson.build | 8 - src/meson.build | 5376 ------------------- src/ulong_extras/test/meson.build | 8 - 11 files changed, 323 insertions(+), 5415 deletions(-) create mode 100644 _meson_build/Makefile create mode 100644 _meson_build/bad_test.c create mode 100644 _meson_build/generate_meson_build.py rename meson.build => _meson_build/meson.build (78%) rename meson.options => _meson_build/meson.options (100%) create mode 100755 meson_bootstrap.py delete mode 100644 src/fmpq/test/meson.build delete mode 100644 src/fmpz/test/meson.build delete mode 100644 src/meson.build delete mode 100644 src/ulong_extras/test/meson.build diff --git a/.gitignore b/.gitignore index ce3195baac..846ed9711e 100644 --- a/.gitignore +++ b/.gitignore @@ -66,3 +66,6 @@ config.m4 src/flint-mparam.h .gdb_history vgcore.* +meson +meson.build +meson.options diff --git a/_meson_build/Makefile b/_meson_build/Makefile new file mode 100644 index 0000000000..e7f05671e9 --- /dev/null +++ b/_meson_build/Makefile @@ -0,0 +1,20 @@ +BUILDDIR = build2 + +all: setup + meson compile -C $(BUILDDIR) + +setup: $(BUILDDIR)/.build-dir-created + +$(BUILDDIR)/.build-dir-created: + meson setup $(BUILDDIR) + touch $(BUILDDIR)/.build-dir-created + +clean: + rm -rf $(BUILDDIR) + +install: compile + meson install -C $(BUILDDIR) + +test: setup + meson configure $(BUILDDIR) -Dtests=enabled + meson test -C $(BUILDDIR) diff --git a/_meson_build/bad_test.c b/_meson_build/bad_test.c new file mode 100644 index 0000000000..3af1103e33 --- /dev/null +++ b/_meson_build/bad_test.c @@ -0,0 +1,10 @@ +/* + * This is used to fail the build tests of someone tries to run them without + * enabling them in the build first. + */ +#include + +int main() { + printf("No tests run. Need to enable building tests with meson configure -Dtests=enabled\n"); + return 1; +} diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py new file mode 100644 index 0000000000..a6d79513b7 --- /dev/null +++ b/_meson_build/generate_meson_build.py @@ -0,0 +1,276 @@ +import sys +from os import listdir +from os.path import join, dirname, abspath, isdir +from shutil import copyfile +from argparse import ArgumentParser + +this_dir = dirname(abspath(__file__)) + +files = [ + 'configure', + 'Makefile', + 'meson.build', + 'meson.options', +] + +# Directories in src that are not modules to be built as part of libflint +exclude_mod_dirs = [ + 'test', + 'profile', + 'interfaces', + 'python', +] + +# Modules that do not have a corresponding header file +mod_no_header = [ + 'generic_files', +] + +# Headers that do not have a corresponding module +head_no_dir = [ + 'NTL-interface', + 'acb_types', + 'acf_types', + 'arb_types', + 'arf_types', + 'config', + 'crt_helpers', + 'flint', + 'flint-config', + 'flint-mparam', + 'fmpq_types', + 'fmpz_mod_types', + 'fmpz_types', + 'fq_nmod_types', + 'fq_types', + 'fq_zech_types', + 'gettimeofday', + 'gmpcompat', + 'limb_types', + 'longlong', + 'longlong_asm_clang', + 'longlong_asm_gcc', + 'longlong_asm_gnu', + 'longlong_div_gnu', + 'longlong_msc_arm64', + 'longlong_msc_x86', + 'machine_vectors', + 'mpf-impl', + 'mpoly_types', + 'n_poly_types', + 'nmod_types', + 'padic_types', + 'profiler', + 'templates', + 'test_helpers', +] + +mod_no_tests = [ + 'ca_vec', + 'calcium', + 'fexpr_builtin', + 'fmpz_mod_vec', + 'fq_zech_mpoly', + 'fq_zech_mpoly_factor', + 'generic_files', + 'hypgeom', + # XXX: Templates... + 'fq_templates', + 'fq_embed_templates', + 'fq_poly_templates', + 'fq_poly_factor_templates', + 'fq_mat_templates', + 'fq_vec_templates', +] + +src_meson_build = '''\ +# +# This file is generated automatically. +# +# To regenerate it, run: +# python _meson_build/generate_meson_build.py +# + +src_dir_inc = include_directories('.') + +modules = [ +%s +] + +modules_no_header = [ +%s +] + +modules_no_tests = [ +%s +] + +headers_no_dir = [ +%s +] + +headers_all = [] +c_files_all = [] +mod_tests = [] + +foreach mod : modules + subdir(mod) + if mod not in modules_no_tests + mod_tests += [mod / 'test'] + endif +endforeach + +foreach mod : modules + headers_no_dir + if mod not in modules_no_header + headers_all += [mod + '.h'] + endif +endforeach + +headers_all = files(headers_all) +''' + +src_mod_meson_build = '''\ +# +# This file is generated automatically. +# +# To regenerate it, run: +# python _meson_build/generate_meson_build.py +# + +c_files_all += files( +%s +) +''' + +test_mod_meson_build = '''\ +# This file is generated automatically. +# +# To regenerate it, run: +# python _meson_build/generate_meson_build.py +# + +test_exe = executable('main', + 'main.c', + dependencies: flint_deps, + link_with: libflint, + include_directories: src_dir_inc, + install: false, +) + +test('%s', test_exe) +''' + +def get_flint_modules(flint_root): + src_path = join(flint_root, 'src') + is_mod = lambda p: isdir(join(src_path, p)) and p not in exclude_mod_dirs + subdirs = [p for p in listdir(src_path) if is_mod(p)] + headers = [p[:-2] for p in listdir(src_path) if p.endswith('.h')] + + # Check for mismatches between subdirs and headers apart from the + # known exceptions (exclude_mod_dirs, mod_no_header, head_no_dir) + extra_dirs = set(subdirs) - set(headers) != set(mod_no_header) + extra_headers = set(headers) - set(subdirs) != set(head_no_dir) + if extra_dirs or extra_headers: + print('Mismatch between subdirs and headers in src') + print('Extra headers:\n', '\n'.join(sorted(extra_headers))) + print('Extra subdirs:\n', '\n'.join(sorted(extra_dirs))) + sys.exit(1) + missing_dirs = set(mod_no_header) - set(subdirs) + missing_headers = (set(head_no_dir) - set(headers)) + if missing_dirs or missing_headers: + print('Missing subdirs:\n', '\n'.join(sorted(missing_dirs))) + print('Missing headers:\n', '\n'.join(sorted(missing_headers))) + sys.exit(1) + + return subdirs + +parser = ArgumentParser(description='Generate Meson build files') + +parser.add_argument('-q', '--quiet', action='store_true', + help='Do not print anything') +parser.add_argument('--error-if-changed', action='store_true', + help='Exit with error code 1 if the files have changed') +parser.add_argument('output_dir', default='.', help='Output directory') + +def main(args): + args = parser.parse_args(args) + + for fname in files: + src_path = join(this_dir, fname) + dst_path = join(args.output_dir, fname) + if not args.quiet: + print('Copying {} to {}'.format(src_path, dst_path)) + if args.error_if_changed: + if not same_files(src_path, dst_path): + print('File {} has changed'.format(dst)) + return 1 + copyfile(src_path, dst_path) + + modules = get_flint_modules(args.output_dir) + + modules_str = '\n'.join(f" '{m}'," for m in sorted(modules)) + mod_no_head_str = '\n'.join(f" '{m}'," for m in sorted(mod_no_header)) + mod_no_test_str = '\n'.join(f" '{m}'," for m in sorted(mod_no_tests)) + head_no_dir_str = '\n'.join(f" '{m}'," for m in sorted(head_no_dir)) + + src_meson_build_text = src_meson_build % ( + modules_str, mod_no_head_str, mod_no_test_str, head_no_dir_str) + + dst_path = join(args.output_dir, 'src', 'meson.build') + + if not args.quiet: + print('Writing meson.build to {}'.format(src_path)) + if args.error_if_changed: + if not same_content(src_meson_build_text, src_path): + print('File {} has changed'.format(src_path)) + return 1 + with open(dst_path, 'w') as fout: + fout.write(src_meson_build_text) + + for mod in modules + mod_no_header: + mod_dir = join(args.output_dir, 'src', mod) + c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] + c_files_str = '\n'.join(f" '{f}'," for f in sorted(c_files)) + src_mod_meson_build_text = src_mod_meson_build % c_files_str + dst_path = join(mod_dir, 'meson.build') + if not args.quiet: + print('Writing meson.build to {}'.format(dst_path)) + if args.error_if_changed: + if not same_content(src_mod_meson_build_text, dst_path): + print('File {} has changed'.format(dst_path)) + return 1 + with open(dst_path, 'w') as fout: + fout.write(src_mod_meson_build_text) + + if mod not in mod_no_tests: + test_dir = join(mod_dir, 'test') + test_mod_meson_build_text = test_mod_meson_build % mod + dst_path = join(test_dir, 'meson.build') + if not args.quiet: + print('Writing meson.build to {}'.format(dst_path)) + if args.error_if_changed: + if not same_content(test_mod_meson_build_text, dst_path): + print('File {} has changed'.format(dst_path)) + return 1 + with open(dst_path, 'w') as fout: + fout.write(test_mod_meson_build_text) + + +def same_files(src_path, dst_path): + with open(src_path, 'rb') as f: + src_content = f.read() + return same_content(src_content, dst_path) + + +def same_content(src_content, dst_path): + try: + with open(dst_path, 'rb') as f: + dst_content = f.read() + except FileNotFoundError: + return False + else: + return src_content == dst_content + + +if __name__ == '__main__': + sys.exit(main(sys.argv[1:])) diff --git a/meson.build b/_meson_build/meson.build similarity index 78% rename from meson.build rename to _meson_build/meson.build index 4ce35d0cd8..326220d250 100644 --- a/meson.build +++ b/_meson_build/meson.build @@ -24,17 +24,6 @@ add_project_arguments( ) subdir('src') - -headers_all = [] -foreach header : headers - headers_all += ['src' / header] -endforeach - -c_files_all = [] -foreach file : c_files_all_subdir - c_files_all += ['src' / file] -endforeach - subdir('detection') if have_assembly @@ -56,11 +45,11 @@ libflint = library('flint', c_files_all, tests_opt = get_option('tests') if tests_opt.enabled() - subdir('src/fmpz/test') - subdir('src/fmpq/test') - subdir('src/ulong_extras/test') + foreach mod_test : mod_tests + subdir('src' / mod_test) + endforeach else - bad_test_exe = executable('bad_test', 'bad_test.c') + bad_test_exe = executable('bad_test', '_meson_build/bad_test.c') test('Need to build tests with -Dtests=enabled', bad_test_exe) endif diff --git a/meson.options b/_meson_build/meson.options similarity index 100% rename from meson.options rename to _meson_build/meson.options diff --git a/meson_bootstrap.py b/meson_bootstrap.py new file mode 100755 index 0000000000..e610fdc18a --- /dev/null +++ b/meson_bootstrap.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +from os.path import join, dirname, abspath +from sys import executable as python, argv +from subprocess import check_call + +this_dir = dirname(abspath(__file__)) +meson_build_dir = join(this_dir, '_meson_build') +generate_script = join(meson_build_dir, 'generate_meson_build.py') +check_call([python, generate_script, this_dir] + argv[1:]) diff --git a/src/fmpq/test/meson.build b/src/fmpq/test/meson.build deleted file mode 100644 index 83d3d4e26f..0000000000 --- a/src/fmpq/test/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -test_exe = executable('main', - 'main.c', - dependencies: flint_deps, - link_with: libflint, - include_directories: src_inc, - install: false, -) -test('fmpq', test_exe) diff --git a/src/fmpz/test/meson.build b/src/fmpz/test/meson.build deleted file mode 100644 index 16a97f6a1f..0000000000 --- a/src/fmpz/test/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -test_exe = executable('main', - 'main.c', - dependencies: flint_deps, - link_with: libflint, - include_directories: src_inc, - install: false, -) -test('fmpz', test_exe) diff --git a/src/meson.build b/src/meson.build deleted file mode 100644 index ace3589521..0000000000 --- a/src/meson.build +++ /dev/null @@ -1,5376 +0,0 @@ -src_inc = include_directories('.') - -headers = [ - 'flint.h', - 'flint-config.h', - 'gmpcompat.h', - # - 'acb_calc.h', - 'acb_dft.h', - 'acb_dirichlet.h', - 'acb_elliptic.h', - 'acb.h', - 'acb_hypgeom.h', - 'acb_mat.h', - 'acb_modular.h', - 'acb_poly.h', - 'acb_theta.h', - 'acb_types.h', - 'acf.h', - 'acf_types.h', - 'aprcl.h', - 'arb_calc.h', - 'arb_fmpz_poly.h', - 'arb_fpwrap.h', - 'arb.h', - 'arb_hypgeom.h', - 'arb_mat.h', - 'arb_poly.h', - 'arb_types.h', - 'arf.h', - 'arf_types.h', - 'arith.h', - 'bernoulli.h', - 'bool_mat.h', - 'ca_ext.h', - 'ca_field.h', - 'ca.h', - 'calcium.h', - 'ca_mat.h', - 'ca_poly.h', - 'ca_vec.h', - 'crt_helpers.h', - 'dirichlet.h', - 'dlog.h', - 'd_mat.h', - 'double_extras.h', - 'double_interval.h', - 'd_vec.h', - 'fexpr_builtin.h', - 'fexpr.h', - 'fft.h', - 'fft_small.h', - 'fmpq.h', - 'fmpq_mat.h', - 'fmpq_mpoly_factor.h', - 'fmpq_mpoly.h', - 'fmpq_poly.h', - 'fmpq_types.h', - 'fmpq_vec.h', - 'fmpz_extras.h', - 'fmpz_factor.h', - 'fmpz.h', - 'fmpzi.h', - 'fmpz_lll.h', - 'fmpz_mat.h', - 'fmpz_mod.h', - 'fmpz_mod_mat.h', - 'fmpz_mod_mpoly_factor.h', - 'fmpz_mod_mpoly.h', - 'fmpz_mod_poly_factor.h', - 'fmpz_mod_poly.h', - 'fmpz_mod_types.h', - 'fmpz_mod_vec.h', - 'fmpz_mpoly_factor.h', - 'fmpz_mpoly.h', - 'fmpz_mpoly_q.h', - 'fmpz_poly_factor.h', - 'fmpz_poly.h', - 'fmpz_poly_mat.h', - 'fmpz_poly_q.h', - 'fmpz_types.h', - 'fmpz_vec.h', - 'fq_default.h', - 'fq_default_mat.h', - 'fq_default_poly_factor.h', - 'fq_default_poly.h', - 'fq_embed.h', - 'fq_embed_templates.h', - 'fq.h', - 'fq_mat.h', - 'fq_mat_templates.h', - 'fq_nmod_embed.h', - 'fq_nmod.h', - 'fq_nmod_mat.h', - 'fq_nmod_mpoly_factor.h', - 'fq_nmod_mpoly.h', - 'fq_nmod_poly_factor.h', - 'fq_nmod_poly.h', - 'fq_nmod_types.h', - 'fq_nmod_vec.h', - 'fq_poly_factor.h', - 'fq_poly_factor_templates.h', - 'fq_poly.h', - 'fq_poly_templates.h', - 'fq_templates.h', - 'fq_types.h', - 'fq_vec.h', - 'fq_vec_templates.h', - 'fq_zech_embed.h', - 'fq_zech.h', - 'fq_zech_mat.h', - 'fq_zech_mpoly_factor.h', - 'fq_zech_mpoly.h', - 'fq_zech_poly_factor.h', - 'fq_zech_poly.h', - 'fq_zech_types.h', - 'fq_zech_vec.h', - 'gettimeofday.h', - 'gr_generic.h', - 'gr.h', - 'gr_mat.h', - 'gr_mpoly.h', - 'gr_poly.h', - 'gr_special.h', - 'gr_vec.h', - 'hypgeom.h', - 'limb_types.h', - 'long_extras.h', - 'longlong_asm_clang.h', - 'longlong_asm_gcc.h', - 'longlong_asm_gnu.h', - 'longlong_div_gnu.h', - 'longlong.h', - 'longlong_msc_arm64.h', - 'longlong_msc_x86.h', - 'machine_vectors.h', - 'mag.h', - 'mpf-impl.h', - 'mpfr_mat.h', - 'mpfr_vec.h', - 'mpn_extras.h', - 'mpoly.h', - 'mpoly_types.h', - 'nf_elem.h', - 'nf.h', - 'nmod.h', - 'nmod_mat.h', - 'nmod_mpoly_factor.h', - 'nmod_mpoly.h', - 'nmod_poly_factor.h', - 'nmod_poly.h', - 'nmod_poly_mat.h', - 'nmod_types.h', - 'nmod_vec.h', - 'n_poly.h', - 'n_poly_types.h', - 'NTL-interface.h', - 'padic.h', - 'padic_mat.h', - 'padic_poly.h', - 'padic_types.h', - 'partitions.h', - 'perm.h', - 'profiler.h', - 'qadic.h', - 'qfb.h', - 'qqbar.h', - 'qsieve.h', - 'templates.h', - 'test_helpers.h', - 'thread_pool.h', - 'thread_support.h', - 'ulong_extras.h', -] - -c_files_all_subdir = [ - # These three not captured by src/*/*.c - #'fmpz/link/fmpz_gc.c', - #'fmpz/link/fmpz_reentrant.c', - 'fmpz/link/fmpz_single.c', - # src/*/*.c - 'acb/acos.c', - 'acb/acosh.c', - 'acb/addmul.c', - 'acb/agm1.c', - 'acb/agm.c', - 'acb/approx_dot.c', - 'acb/arg.c', - 'acb/asin.c', - 'acb/asinh.c', - 'acb/atan.c', - 'acb/atanh.c', - 'acb/barnes_g.c', - 'acb/bernoulli_poly_ui.c', - 'acb_calc/cauchy_bound.c', - 'acb_calc/integrate.c', - 'acb_calc/integrate_gl_auto_deg.c', - 'acb_calc/integrate_opt_init.c', - 'acb_calc/integrate_taylor.c', - 'acb/chebyshev_t2_ui.c', - 'acb/chebyshev_t_ui.c', - 'acb/chebyshev_u2_ui.c', - 'acb/chebyshev_u_ui.c', - 'acb/clear.c', - 'acb/contains_int.c', - 'acb/cos.c', - 'acb/cos_pi.c', - 'acb/cot.c', - 'acb/cot_pi.c', - 'acb/csch.c', - 'acb/csc_pi.c', - 'acb/csgn.c', - 'acb/cube.c', - 'acb_dft/bluestein.c', - 'acb_dft/convol.c', - 'acb_dft/convol_dft.c', - 'acb_dft/convol_mullow.c', - 'acb_dft/convol_naive.c', - 'acb_dft/convol_rad2.c', - 'acb_dft/crt.c', - 'acb_dft/cyc.c', - 'acb_dft/naive.c', - 'acb_dft/precomp.c', - 'acb_dft/prod.c', - 'acb_dft/rad2.c', - 'acb_dft/rad2_threaded.c', - 'acb_dft/step.c', - 'acb/digamma.c', - 'acb_dirichlet/arb_quadratic_powers.c', - 'acb_dirichlet/backlund_s_bound.c', - 'acb_dirichlet/backlund_s.c', - 'acb_dirichlet/backlund_s_gram.c', - 'acb_dirichlet/chi.c', - 'acb_dirichlet/chi_vec.c', - 'acb_dirichlet/dft.c', - 'acb_dirichlet/eta.c', - 'acb_dirichlet/euler_product_real_ui.c', - 'acb_dirichlet/gauss_sum.c', - 'acb_dirichlet/gauss_sum_factor.c', - 'acb_dirichlet/gauss_sum_naive.c', - 'acb_dirichlet/gauss_sum_order2.c', - 'acb_dirichlet/gauss_sum_theta.c', - 'acb_dirichlet/gram_point.c', - 'acb_dirichlet/hardy_theta.c', - 'acb_dirichlet/hardy_theta_series.c', - 'acb_dirichlet/hardy_z.c', - 'acb_dirichlet/hardy_z_series.c', - 'acb_dirichlet/hardy_z_zero.c', - 'acb_dirichlet/hurwitz.c', - 'acb_dirichlet/hurwitz_precomp_bound.c', - 'acb_dirichlet/hurwitz_precomp_choose_param.c', - 'acb_dirichlet/hurwitz_precomp_clear.c', - 'acb_dirichlet/hurwitz_precomp_eval.c', - 'acb_dirichlet/hurwitz_precomp_init.c', - 'acb_dirichlet/isolate_hardy_z_zero.c', - 'acb_dirichlet/jacobi_sum.c', - 'acb_dirichlet/jacobi_sum_factor.c', - 'acb_dirichlet/jacobi_sum_gauss.c', - 'acb_dirichlet/jacobi_sum_naive.c', - 'acb_dirichlet/l.c', - 'acb_dirichlet/lerch_phi.c', - 'acb_dirichlet/lerch_phi_direct.c', - 'acb_dirichlet/lerch_phi_integral.c', - 'acb_dirichlet/l_euler_product.c', - 'acb_dirichlet/l_fmpq_afe.c', - 'acb_dirichlet/l_fmpq.c', - 'acb_dirichlet/l_hurwitz.c', - 'acb_dirichlet/l_jet.c', - 'acb_dirichlet/l_series.c', - 'acb_dirichlet/l_vec_hurwitz.c', - 'acb_dirichlet/pairing.c', - 'acb_dirichlet/pairing_conrey.c', - 'acb_dirichlet/platt_beta.c', - 'acb_dirichlet/platt_c_bound.c', - 'acb_dirichlet/platt_hardy_z_zeros.c', - 'acb_dirichlet/platt_i_bound.c', - 'acb_dirichlet/platt_lemma_32.c', - 'acb_dirichlet/platt_lemma_A11.c', - 'acb_dirichlet/platt_lemma_A5.c', - 'acb_dirichlet/platt_lemma_A7.c', - 'acb_dirichlet/platt_lemma_A9.c', - 'acb_dirichlet/platt_lemma_B1.c', - 'acb_dirichlet/platt_lemma_B2.c', - 'acb_dirichlet/platt_local_hardy_z_zeros.c', - 'acb_dirichlet/platt_multieval.c', - 'acb_dirichlet/platt_multieval_threaded.c', - 'acb_dirichlet/platt_ws_interpolation.c', - 'acb_dirichlet/platt_zeta_zeros.c', - 'acb_dirichlet/powsum_sieved.c', - 'acb_dirichlet/powsum_smooth.c', - 'acb_dirichlet/powsum_term.c', - 'acb_dirichlet/qseries_arb.c', - 'acb_dirichlet/qseries_arb_powers.c', - 'acb_dirichlet/root.c', - 'acb_dirichlet/root_number.c', - 'acb_dirichlet/roots_clear.c', - 'acb_dirichlet/roots_init.c', - 'acb_dirichlet/si_poly_evaluate.c', - 'acb_dirichlet/stieltjes.c', - 'acb_dirichlet/theta_arb.c', - 'acb_dirichlet/theta_length.c', - 'acb_dirichlet/turing_method_bound.c', - 'acb_dirichlet/ui_theta_arb.c', - 'acb_dirichlet/vec_mellin_arb.c', - 'acb_dirichlet/xi.c', - 'acb_dirichlet/zeta_bound.c', - 'acb_dirichlet/zeta.c', - 'acb_dirichlet/zeta_jet.c', - 'acb_dirichlet/zeta_jet_rs.c', - 'acb_dirichlet/zeta_rs_bound.c', - 'acb_dirichlet/zeta_rs.c', - 'acb_dirichlet/zeta_rs_d_coeffs.c', - 'acb_dirichlet/zeta_rs_f_coeffs.c', - 'acb_dirichlet/zeta_rs_r.c', - 'acb_dirichlet/zeta_zeros.c', - 'acb/div.c', - 'acb/dot.c', - 'acb/dot_fmpz.c', - 'acb/dot_precise.c', - 'acb/dot_si.c', - 'acb/dot_simple.c', - 'acb/dot_siui.c', - 'acb/dot_ui.c', - 'acb/dot_uiui.c', - 'acb_elliptic/e.c', - 'acb_elliptic/e_inc.c', - 'acb_elliptic/f.c', - 'acb_elliptic/invariants.c', - 'acb_elliptic/inv_p.c', - 'acb_elliptic/k.c', - 'acb_elliptic/k_jet.c', - 'acb_elliptic/k_series.c', - 'acb_elliptic/p.c', - 'acb_elliptic/pi.c', - 'acb_elliptic/p_jet.c', - 'acb_elliptic/p_prime.c', - 'acb_elliptic/p_series.c', - 'acb_elliptic/rc1.c', - 'acb_elliptic/rf.c', - 'acb_elliptic/rg.c', - 'acb_elliptic/rj.c', - 'acb_elliptic/roots.c', - 'acb_elliptic/zeta.c', - 'acb/exp.c', - 'acb/exp_invexp.c', - 'acb/expm1.c', - 'acb/exp_pi_i.c', - 'acb/gamma.c', - 'acb/get_abs_lbound_arf.c', - 'acb/get_abs_ubound_arf.c', - 'acb/get_mag.c', - 'acb/get_mag_lower.c', - 'acb/get_rad_ubound_arf.c', - 'acb/get_unique_fmpz.c', - 'acb_hypgeom/0f1.c', - 'acb_hypgeom/2f1.c', - 'acb_hypgeom/2f1_choose.c', - 'acb_hypgeom/2f1_continuation.c', - 'acb_hypgeom/2f1_corner.c', - 'acb_hypgeom/2f1_direct.c', - 'acb_hypgeom/2f1_series_direct.c', - 'acb_hypgeom/2f1_transform.c', - 'acb_hypgeom/airy_asymp.c', - 'acb_hypgeom/airy_bound.c', - 'acb_hypgeom/airy.c', - 'acb_hypgeom/airy_direct.c', - 'acb_hypgeom/airy_jet.c', - 'acb_hypgeom/airy_series.c', - 'acb_hypgeom/bessel_i.c', - 'acb_hypgeom/bessel_j.c', - 'acb_hypgeom/bessel_k.c', - 'acb_hypgeom/bessel_y.c', - 'acb_hypgeom/beta_lower.c', - 'acb_hypgeom/beta_lower_series.c', - 'acb_hypgeom/chebyshev_t.c', - 'acb_hypgeom/chebyshev_u.c', - 'acb_hypgeom/chi.c', - 'acb_hypgeom/chi_series.c', - 'acb_hypgeom/ci.c', - 'acb_hypgeom/ci_series.c', - 'acb_hypgeom/coulomb.c', - 'acb_hypgeom/coulomb_jet.c', - 'acb_hypgeom/coulomb_series.c', - 'acb_hypgeom/dilog_bernoulli.c', - 'acb_hypgeom/dilog_bitburst.c', - 'acb_hypgeom/dilog.c', - 'acb_hypgeom/dilog_continuation.c', - 'acb_hypgeom/dilog_transform.c', - 'acb_hypgeom/dilog_zero.c', - 'acb_hypgeom/dilog_zero_taylor.c', - 'acb_hypgeom/ei.c', - 'acb_hypgeom/ei_series.c', - 'acb_hypgeom/erf.c', - 'acb_hypgeom/erfc.c', - 'acb_hypgeom/erfc_series.c', - 'acb_hypgeom/erfi.c', - 'acb_hypgeom/erfi_series.c', - 'acb_hypgeom/erf_series.c', - 'acb_hypgeom/expint.c', - 'acb_hypgeom/fresnel.c', - 'acb_hypgeom/fresnel_series.c', - 'acb_hypgeom/gamma.c', - 'acb_hypgeom/gamma_lower.c', - 'acb_hypgeom/gamma_lower_series.c', - 'acb_hypgeom/gamma_stirling_sum_horner.c', - 'acb_hypgeom/gamma_stirling_sum_improved.c', - 'acb_hypgeom/gamma_taylor.c', - 'acb_hypgeom/gamma_upper.c', - 'acb_hypgeom/gamma_upper_series.c', - 'acb_hypgeom/gegenbauer_c.c', - 'acb_hypgeom/hermite_h.c', - 'acb_hypgeom/jacobi_p.c', - 'acb_hypgeom/laguerre_l.c', - 'acb_hypgeom/legendre_p.c', - 'acb_hypgeom/legendre_p_uiui_rec.c', - 'acb_hypgeom/legendre_q.c', - 'acb_hypgeom/lgamma.c', - 'acb_hypgeom/li.c', - 'acb_hypgeom/li_series.c', - 'acb_hypgeom/log_rising_ui_jet.c', - 'acb_hypgeom/m.c', - 'acb_hypgeom/pfq_bound_factor.c', - 'acb_hypgeom/pfq.c', - 'acb_hypgeom/pfq_choose_n.c', - 'acb_hypgeom/pfq_direct.c', - 'acb_hypgeom/pfq_series_direct.c', - 'acb_hypgeom/pfq_series_sum_bs.c', - 'acb_hypgeom/pfq_series_sum.c', - 'acb_hypgeom/pfq_series_sum_forward.c', - 'acb_hypgeom/pfq_series_sum_rs.c', - 'acb_hypgeom/pfq_sum_bs.c', - 'acb_hypgeom/pfq_sum.c', - 'acb_hypgeom/pfq_sum_fme.c', - 'acb_hypgeom/pfq_sum_forward.c', - 'acb_hypgeom/pfq_sum_rs.c', - 'acb_hypgeom/rising_ui_bs.c', - 'acb_hypgeom/rising_ui.c', - 'acb_hypgeom/rising_ui_forward.c', - 'acb_hypgeom/rising_ui_jet_bs.c', - 'acb_hypgeom/rising_ui_jet.c', - 'acb_hypgeom/rising_ui_jet_powsum.c', - 'acb_hypgeom/rising_ui_jet_rs.c', - 'acb_hypgeom/rising_ui_rec.c', - 'acb_hypgeom/rising_ui_rs.c', - 'acb_hypgeom/shi.c', - 'acb_hypgeom/shi_series.c', - 'acb_hypgeom/si.c', - 'acb_hypgeom/si_series.c', - 'acb_hypgeom/spherical_y.c', - 'acb_hypgeom/u_asymp.c', - 'acb_hypgeom/u.c', - 'acb_hypgeom/u_use_asymp.c', - 'acb/inlines.c', - 'acb/inv.c', - 'acb/io.c', - 'acb/lambertw_asymp.c', - 'acb/lambertw_bound_deriv.c', - 'acb/lambertw.c', - 'acb/lambertw_check_branch.c', - 'acb/log1p.c', - 'acb/log.c', - 'acb/log_sin_pi.c', - 'acb_mat/add.c', - 'acb_mat/approx_eig_qr.c', - 'acb_mat/approx_inv.c', - 'acb_mat/approx_lu.c', - 'acb_mat/approx_mul.c', - 'acb_mat/approx_solve.c', - 'acb_mat/approx_solve_lu_precomp.c', - 'acb_mat/approx_solve_tril.c', - 'acb_mat/approx_solve_triu.c', - 'acb_mat/bound_frobenius_norm.c', - 'acb_mat/bound_inf_norm.c', - 'acb_mat/charpoly.c', - 'acb_mat/clear.c', - 'acb_mat/companion.c', - 'acb_mat/conjugate.c', - 'acb_mat/contains.c', - 'acb_mat/contains_fmpq_mat.c', - 'acb_mat/contains_fmpz_mat.c', - 'acb_mat/det.c', - 'acb_mat/det_lu.c', - 'acb_mat/det_precond.c', - 'acb_mat/dft.c', - 'acb_mat/diag_prod.c', - 'acb_mat/eig_enclosure_rump.c', - 'acb_mat/eig_global_enclosure.c', - 'acb_mat/eig_multiple.c', - 'acb_mat/eig_multiple_rump.c', - 'acb_mat/eig_simple.c', - 'acb_mat/eig_simple_rump.c', - 'acb_mat/eig_simple_vdhoeven_mourrain.c', - 'acb_mat/eq.c', - 'acb_mat/equal.c', - 'acb_mat/exp.c', - 'acb_mat/exp_taylor_sum.c', - 'acb_mat/find_pivot_partial.c', - 'acb_mat/frobenius_norm.c', - 'acb_mat/get_imag.c', - 'acb_mat/get_real.c', - 'acb_mat/indeterminate.c', - 'acb_mat/init.c', - 'acb_mat/inlines.c', - 'acb_mat/inv.c', - 'acb_mat/io.c', - 'acb_mat/is_exact.c', - 'acb_mat/is_finite.c', - 'acb_mat/is_real.c', - 'acb_mat/is_tril.c', - 'acb_mat/is_triu.c', - 'acb_mat/is_zero.c', - 'acb_mat/lu.c', - 'acb_mat/lu_classical.c', - 'acb_mat/lu_recursive.c', - 'acb_mat/mul.c', - 'acb_mat/mul_classical.c', - 'acb_mat/mul_entrywise.c', - 'acb_mat/mul_reorder.c', - 'acb_mat/mul_threaded.c', - 'acb_mat/ne.c', - 'acb_mat/neg.c', - 'acb_mat/one.c', - 'acb_mat/onei.c', - 'acb_mat/ones.c', - 'acb_mat/overlaps.c', - 'acb_mat/pow_ui.c', - 'acb_mat/randtest.c', - 'acb_mat/randtest_eig.c', - 'acb_mat/set_arb_mat.c', - 'acb_mat/set.c', - 'acb_mat/set_fmpq_mat.c', - 'acb_mat/set_fmpz_mat.c', - 'acb_mat/set_real_imag.c', - 'acb_mat/set_round_arb_mat.c', - 'acb_mat/set_round_fmpz_mat.c', - 'acb_mat/solve.c', - 'acb_mat/solve_lu.c', - 'acb_mat/solve_lu_precomp.c', - 'acb_mat/solve_precond.c', - 'acb_mat/solve_tril.c', - 'acb_mat/solve_triu.c', - 'acb_mat/sqr.c', - 'acb_mat/sqr_classical.c', - 'acb_mat/sub.c', - 'acb_mat/trace.c', - 'acb_mat/transpose.c', - 'acb_mat/vector_mul.c', - 'acb_mat/window_init.c', - 'acb_mat/zero.c', - 'acb_modular/addseq.c', - 'acb_modular/delta.c', - 'acb_modular/eisenstein.c', - 'acb_modular/elliptic_e.c', - 'acb_modular/elliptic_k.c', - 'acb_modular/elliptic_k_cpx.c', - 'acb_modular/elliptic_p.c', - 'acb_modular/elliptic_p_zpx.c', - 'acb_modular/epsilon_arg.c', - 'acb_modular/eta.c', - 'acb_modular/eta_sum.c', - 'acb_modular/fill_addseq.c', - 'acb_modular/fundamental_domain_approx_arf.c', - 'acb_modular/fundamental_domain_approx.c', - 'acb_modular/fundamental_domain_approx_d.c', - 'acb_modular/hilbert_class_poly.c', - 'acb_modular/inlines.c', - 'acb_modular/io.c', - 'acb_modular/is_in_fundamental_domain.c', - 'acb_modular/j.c', - 'acb_modular/lambda.c', - 'acb_modular/psl2z.c', - 'acb_modular/theta.c', - 'acb_modular/theta_const_sum_basecase.c', - 'acb_modular/theta_const_sum.c', - 'acb_modular/theta_const_sum_rs.c', - 'acb_modular/theta_jet.c', - 'acb_modular/theta_jet_notransform.c', - 'acb_modular/theta_series.c', - 'acb_modular/theta_sum.c', - 'acb_modular/theta_transform.c', - 'acb_modular/transform.c', - 'acb/mul.c', - 'acb/mul_naive.c', - 'acb_poly/add.c', - 'acb_poly/add_series.c', - 'acb_poly/add_si.c', - 'acb_poly/agm1_series.c', - 'acb_poly/atan_series.c', - 'acb_poly/binomial_transform_basecase.c', - 'acb_poly/binomial_transform.c', - 'acb_poly/binomial_transform_convolution.c', - 'acb_poly/borel_transform.c', - 'acb_poly/clear.c', - 'acb_poly/compose.c', - 'acb_poly/compose_series.c', - 'acb_poly/contains.c', - 'acb_poly/contains_fmpq_poly.c', - 'acb_poly/contains_fmpz_poly.c', - 'acb_poly/cosh_series.c', - 'acb_poly/cos_pi_series.c', - 'acb_poly/cos_series.c', - 'acb_poly/cot_pi_series.c', - 'acb_poly/derivative.c', - 'acb_poly/digamma_series.c', - 'acb_poly/divrem.c', - 'acb_poly/div_root.c', - 'acb_poly/div_series.c', - 'acb_poly/elliptic_k_series.c', - 'acb_poly/elliptic_p_series.c', - 'acb_poly/equal.c', - 'acb_poly/erf_series.c', - 'acb_poly/evaluate2.c', - 'acb_poly/evaluate2_horner.c', - 'acb_poly/evaluate2_rectangular.c', - 'acb_poly/evaluate.c', - 'acb_poly/evaluate_horner.c', - 'acb_poly/evaluate_rectangular.c', - 'acb_poly/evaluate_vec_fast.c', - 'acb_poly/evaluate_vec_iter.c', - 'acb_poly/exp_pi_i_series.c', - 'acb_poly/exp_series_basecase.c', - 'acb_poly/exp_series.c', - 'acb_poly/find_roots.c', - 'acb_poly/fit_length.c', - 'acb/polygamma.c', - 'acb_poly/gamma_series.c', - 'acb_poly/get_coeff_acb.c', - 'acb_poly/get_unique_fmpz_poly.c', - 'acb_poly/graeffe_transform.c', - 'acb_poly/init.c', - 'acb_poly/inlines.c', - 'acb_poly/integral.c', - 'acb_poly/interpolate_barycentric.c', - 'acb_poly/interpolate_fast.c', - 'acb_poly/interpolate_newton.c', - 'acb_poly/inv_borel_transform.c', - 'acb_poly/inv_series.c', - 'acb_poly/io.c', - 'acb_poly/lambertw_series.c', - 'acb_poly/lgamma_series.c', - 'acb_poly/log1p_series.c', - 'acb/polylog.c', - 'acb_poly/log_series.c', - 'acb_poly/majorant.c', - 'acb_poly/mul.c', - 'acb_poly/mullow.c', - 'acb_poly/mullow_classical.c', - 'acb_poly/mullow_transpose.c', - 'acb_poly/mullow_transpose_gauss.c', - 'acb_poly/normalise.c', - 'acb_poly/nth_derivative.c', - 'acb_poly/overlaps.c', - 'acb_poly/polylog_series.c', - 'acb_poly/pow_acb_series.c', - 'acb_poly/pow_series.c', - 'acb_poly/powsum_one_series_sieved.c', - 'acb_poly/powsum_series_naive.c', - 'acb_poly/powsum_series_naive_threaded.c', - 'acb_poly/pow_ui.c', - 'acb_poly/pow_ui_trunc_binexp.c', - 'acb_poly/product_roots.c', - 'acb_poly/randtest.c', - 'acb_poly/refine_roots_durand_kerner.c', - 'acb_poly/reverse.c', - 'acb_poly/revert_series.c', - 'acb_poly/rgamma_series.c', - 'acb_poly/rising_ui_series.c', - 'acb_poly/root_bound_fujiwara.c', - 'acb_poly/root_inclusion.c', - 'acb_poly/rsqrt_series.c', - 'acb_poly/set2_arb_poly.c', - 'acb_poly/set2_fmpq_poly.c', - 'acb_poly/set2_fmpz_poly.c', - 'acb_poly/set.c', - 'acb_poly/set_coeff_acb.c', - 'acb_poly/set_coeff_si.c', - 'acb_poly/set_fmpz_poly.c', - 'acb_poly/set_length.c', - 'acb_poly/set_round.c', - 'acb_poly/set_si.c', - 'acb_poly/set_trunc.c', - 'acb_poly/set_trunc_round.c', - 'acb_poly/shift_left.c', - 'acb_poly/shift_right.c', - 'acb_poly/sin_cos_series.c', - 'acb_poly/sinc_series.c', - 'acb_poly/sinh_cosh_series_basecase.c', - 'acb_poly/sinh_cosh_series.c', - 'acb_poly/sinh_cosh_series_exponential.c', - 'acb_poly/sinh_series.c', - 'acb_poly/sin_pi_series.c', - 'acb_poly/sin_series.c', - 'acb_poly/sqrt_series.c', - 'acb_poly/sub.c', - 'acb_poly/sub_series.c', - 'acb_poly/tan_series.c', - 'acb_poly/taylor_shift.c', - 'acb_poly/tree.c', - 'acb_poly/validate_real_roots.c', - 'acb_poly/validate_roots.c', - 'acb_poly/valuation.c', - 'acb_poly/zeta_em_bound.c', - 'acb_poly/zeta_em_choose_param.c', - 'acb_poly/zeta_em_sum.c', - 'acb_poly/zeta_em_tail_bsplit.c', - 'acb_poly/zeta_em_tail_naive.c', - 'acb_poly/zeta_series.c', - 'acb/pow.c', - 'acb/quadratic_roots_fmpz.c', - 'acb/randtest.c', - 'acb/real_abs.c', - 'acb/real_ceil.c', - 'acb/real_floor.c', - 'acb/real_heaviside.c', - 'acb/real_max.c', - 'acb/real_min.c', - 'acb/real_sgn.c', - 'acb/real_sqrtpos.c', - 'acb/rel_error_bits.c', - 'acb/rising2_ui.c', - 'acb/rising_ui.c', - 'acb/rising_ui_get_mag.c', - 'acb/root_ui.c', - 'acb/rsqrt.c', - 'acb/sech.c', - 'acb/sgn.c', - 'acb/sin.c', - 'acb/sinc.c', - 'acb/sin_cos.c', - 'acb/sin_cos_pi.c', - 'acb/sinc_pi.c', - 'acb/sin_pi.c', - 'acb/sqrt.c', - 'acb/sqrts.c', - 'acb/submul.c', - 'acb/tan.c', - 'acb/tan_pi.c', - 'acb_theta/agm_hadamard.c', - 'acb_theta/agm_mul.c', - 'acb_theta/agm_mul_tight.c', - 'acb_theta/agm_sqrt.c', - 'acb_theta/all.c', - 'acb_theta/char_dot_acb.c', - 'acb_theta/char_dot.c', - 'acb_theta/char_dot_slong.c', - 'acb_theta/char_get_a.c', - 'acb_theta/char_get_acb.c', - 'acb_theta/char_get_arb.c', - 'acb_theta/char_get_slong.c', - 'acb_theta/char_is_even.c', - 'acb_theta/char_is_goepel.c', - 'acb_theta/char_is_syzygous.c', - 'acb_theta/dist_a0.c', - 'acb_theta/dist_addprec.c', - 'acb_theta/dist_lat.c', - 'acb_theta/dist_pt.c', - 'acb_theta/eld_border.c', - 'acb_theta/eld_clear.c', - 'acb_theta/eld_contains.c', - 'acb_theta/eld_init.c', - 'acb_theta/eld_points.c', - 'acb_theta/eld_print.c', - 'acb_theta/eld_set.c', - 'acb_theta/g2_character.c', - 'acb_theta/g2_chi10.c', - 'acb_theta/g2_chi12.c', - 'acb_theta/g2_chi35.c', - 'acb_theta/g2_chi3_6.c', - 'acb_theta/g2_chi5.c', - 'acb_theta/g2_covariants.c', - 'acb_theta/g2_covariants_lead.c', - 'acb_theta/g2_detk_symj.c', - 'acb_theta/g2_jet_naive_1.c', - 'acb_theta/g2_psi4.c', - 'acb_theta/g2_psi6.c', - 'acb_theta/g2_sextic.c', - 'acb_theta/g2_sextic_chi5.c', - 'acb_theta/g2_transvectant.c', - 'acb_theta/g2_transvectant_lead.c', - 'acb_theta/jet_all.c', - 'acb_theta/jet_compose.c', - 'acb_theta/jet_error_bounds.c', - 'acb_theta/jet_exp_pi_i.c', - 'acb_theta/jet_index.c', - 'acb_theta/jet_mul.c', - 'acb_theta/jet_naive_00.c', - 'acb_theta/jet_naive_all.c', - 'acb_theta/jet_naive_fixed_ab.c', - 'acb_theta/jet_naive_radius.c', - 'acb_theta/jet_nb.c', - 'acb_theta/jet_ql_all.c', - 'acb_theta/jet_ql_bounds.c', - 'acb_theta/jet_ql_finite_diff.c', - 'acb_theta/jet_ql_radius.c', - 'acb_theta/jet_total_order.c', - 'acb_theta/jet_tuples.c', - 'acb_theta/naive_00.c', - 'acb_theta/naive_0b.c', - 'acb_theta/naive_all.c', - 'acb_theta/naive_fixed_ab.c', - 'acb_theta/naive_fixed_a.c', - 'acb_theta/naive_radius.c', - 'acb_theta/naive_reduce.c', - 'acb_theta/naive_term.c', - 'acb_theta/naive_worker.c', - 'acb_theta/ql_a0.c', - 'acb_theta/ql_a0_naive.c', - 'acb_theta/ql_a0_nb_steps.c', - 'acb_theta/ql_a0_split.c', - 'acb_theta/ql_a0_steps.c', - 'acb_theta/ql_all.c', - 'acb_theta/ql_reduce.c', - 'acb_theta/siegel_cho.c', - 'acb_theta/siegel_cocycle.c', - 'acb_theta/siegel_is_reduced.c', - 'acb_theta/siegel_randtest.c', - 'acb_theta/siegel_randtest_reduced.c', - 'acb_theta/siegel_randtest_vec.c', - 'acb_theta/siegel_reduce.c', - 'acb_theta/siegel_transform.c', - 'acb_theta/siegel_transform_cocycle_inv.c', - 'acb_theta/siegel_transform_z.c', - 'acb_theta/siegel_yinv.c', - 'acb_theta/sp2gz_block_diag.c', - 'acb_theta/sp2gz_decompose.c', - 'acb_theta/sp2gz_embed.c', - 'acb_theta/sp2gz_fundamental.c', - 'acb_theta/sp2gz_inv.c', - 'acb_theta/sp2gz_is_block_diag.c', - 'acb_theta/sp2gz_is_correct.c', - 'acb_theta/sp2gz_is_embedded.c', - 'acb_theta/sp2gz_is_j.c', - 'acb_theta/sp2gz_is_trig.c', - 'acb_theta/sp2gz_j.c', - 'acb_theta/sp2gz_nb_fundamental.c', - 'acb_theta/sp2gz_randtest.c', - 'acb_theta/sp2gz_restrict.c', - 'acb_theta/sp2gz_set_blocks.c', - 'acb_theta/sp2gz_trig.c', - 'acb_theta/transform_char.c', - 'acb_theta/transform_kappa2.c', - 'acb_theta/transform_kappa.c', - 'acb_theta/transform_proj.c', - 'acb_theta/transform_sqrtdet.c', - 'acb/unit_root.c', - 'acb/urandom.c', - 'acb/vec_clear.c', - 'acb/vec_init.c', - 'acb/vec_set_powers.c', - 'acb/vec_sort_pretty.c', - 'acb/vec_unit_roots.c', - 'acb/zeta.c', - 'acf/approx_div.c', - 'acf/approx_dot.c', - 'acf/approx_sqrt.c', - 'acf/inlines.c', - 'aprcl/config_gauss.c', - 'aprcl/config_jacobi.c', - 'aprcl/f_table.c', - 'aprcl/is_mul_coprime.c', - 'aprcl/is_prime.c', - 'aprcl/is_prime_final_division.c', - 'aprcl/is_prime_gauss.c', - 'aprcl/is_prime_jacobi.c', - 'aprcl/unity_zp_add.c', - 'aprcl/unity_zp_aut.c', - 'aprcl/unity_zp_aut_inv.c', - 'aprcl/unity_zp_auxiliary_routine.c', - 'aprcl/unity_zp_coeff.c', - 'aprcl/unity_zp_copy.c', - 'aprcl/unity_zp_equal.c', - 'aprcl/unity_zp_init.c', - 'aprcl/unity_zp_is_unity.c', - 'aprcl/unity_zp_jacobi_sum.c', - 'aprcl/unity_zp_mul.c', - 'aprcl/unity_zp_pow_2k.c', - 'aprcl/unity_zp_pow.c', - 'aprcl/unity_zp_pow_select_k.c', - 'aprcl/unity_zp_pow_sliding.c', - 'aprcl/unity_zpq_add.c', - 'aprcl/unity_zpq_clear.c', - 'aprcl/unity_zpq_coeff_add.c', - 'aprcl/unity_zpq_coeff_set.c', - 'aprcl/unity_zpq_copy.c', - 'aprcl/unity_zpq_equal.c', - 'aprcl/unity_zpq_gauss_sum.c', - 'aprcl/unity_zpq_gauss_sum_character_pow.c', - 'aprcl/unity_zpq_init.c', - 'aprcl/unity_zpq_mul.c', - 'aprcl/unity_zpq_mul_unity_p.c', - 'aprcl/unity_zpq_pow.c', - 'aprcl/unity_zpq_swap.c', - 'aprcl/unity_zp_reduce_cyclotomic.c', - 'aprcl/unity_zp_set_zero.c', - 'aprcl/unity_zp_sqr.c', - 'aprcl/unity_zp_swap.c', - 'aprcl/utility.c', - 'arb/abs.c', - 'arb/acos.c', - 'arb/acosh.c', - 'arb/add.c', - 'arb/add_error.c', - 'arb/addmul.c', - 'arb/agm.c', - 'arb/approx_dot.c', - 'arb/asin.c', - 'arb/asinh.c', - 'arb/atan2.c', - 'arb/atan_arf_bb.c', - 'arb/atan_arf.c', - 'arb/atan.c', - 'arb/atan_frac_bsplit.c', - 'arb/atanh.c', - 'arb/atan_newton.c', - 'arb/atan_sum_bs_powtab.c', - 'arb/atan_sum_bs_simple.c', - 'arb/atan_tab.c', - 'arb/atan_taylor_naive.c', - 'arb/atan_taylor_rs.c', - 'arb/bell_fmpz.c', - 'arb/bell_sum_bsplit.c', - 'arb/bell_sum_taylor.c', - 'arb/bernoulli_fmpz.c', - 'arb/bernoulli_poly_ui.c', - 'arb/bernoulli_ui.c', - 'arb/bernoulli_ui_zeta.c', - 'arb/bin.c', - 'arb_calc/io.c', - 'arb_calc/isolate_roots.c', - 'arb_calc/newton_conv_factor.c', - 'arb_calc/newton_step.c', - 'arb_calc/refine_root_bisect.c', - 'arb_calc/refine_root_newton.c', - 'arb_calc/verbose.c', - 'arb/can_round_mpfr.c', - 'arb/ceil.c', - 'arb/chebyshev_t_ui.c', - 'arb/chebyshev_u_ui.c', - 'arb/clear.c', - 'arb/const_apery.c', - 'arb/const_catalan.c', - 'arb/const_e.c', - 'arb/const_euler.c', - 'arb/const_glaisher.c', - 'arb/const_khinchin.c', - 'arb/const_log10.c', - 'arb/const_log2.c', - 'arb/const_log_sqrt2pi.c', - 'arb/const_pi.c', - 'arb/const_reciprocal_fibonacci.c', - 'arb/const_sqrt_pi.c', - 'arb/contains.c', - 'arb/cot.c', - 'arb/coth.c', - 'arb/cot_pi.c', - 'arb/csc.c', - 'arb/csch.c', - 'arb/csc_pi.c', - 'arb/digamma.c', - 'arb/div_2expm1_ui.c', - 'arb/div.c', - 'arb/dot.c', - 'arb/dot_fmpz.c', - 'arb/dot_precise.c', - 'arb/dot_si.c', - 'arb/dot_simple.c', - 'arb/dot_siui.c', - 'arb/dot_ui.c', - 'arb/dot_uiui.c', - 'arb/doublefac_ui.c', - 'arb/euler_number_fmpz.c', - 'arb/euler_number_ui.c', - 'arb/exp_arf_bb.c', - 'arb/exp_arf.c', - 'arb/exp_arf_rs_generic.c', - 'arb/exp.c', - 'arb/exp_sum_bs_powtab.c', - 'arb/exp_sum_bs_simple.c', - 'arb/exp_tab.c', - 'arb/exp_taylor_bound.c', - 'arb/exp_taylor_naive.c', - 'arb/exp_taylor_rs.c', - 'arb/fac.c', - 'arb/fib.c', - 'arb/floor.c', - 'arb/fma.c', - 'arb_fmpz_poly/complex_roots.c', - 'arb_fmpz_poly/deflate.c', - 'arb_fmpz_poly/deflation.c', - 'arb_fmpz_poly/evaluate_acb.c', - 'arb_fmpz_poly/evaluate_acb_horner.c', - 'arb_fmpz_poly/evaluate_acb_rectangular.c', - 'arb_fmpz_poly/evaluate_arb.c', - 'arb_fmpz_poly/evaluate_arb_horner.c', - 'arb_fmpz_poly/evaluate_arb_rectangular.c', - 'arb_fmpz_poly/gauss_period_minpoly.c', - 'arb_fpwrap/fpwrap.c', - 'arb/gamma.c', - 'arb/get_abs_lbound_arf.c', - 'arb/get_abs_ubound_arf.c', - 'arb/get_fmpz_mid_rad_10exp.c', - 'arb/get_interval_arf.c', - 'arb/get_interval_fmpz_2exp.c', - 'arb/get_interval_mpfr.c', - 'arb/get_lbound_arf.c', - 'arb/get_mag_lower.c', - 'arb/get_mag_lower_nonnegative.c', - 'arb/get_mpn_fixed_mod_log2.c', - 'arb/get_mpn_fixed_mod_pi4.c', - 'arb/get_rand_fmpq.c', - 'arb/get_str.c', - 'arb/get_ubound_arf.c', - 'arb/get_unique_fmpz.c', - 'arb/hurwitz_zeta.c', - 'arb_hypgeom/1f1_integration.c', - 'arb_hypgeom/2f1_integration.c', - 'arb_hypgeom/airy.c', - 'arb_hypgeom/airy_jet.c', - 'arb_hypgeom/airy_series.c', - 'arb_hypgeom/airy_zero.c', - 'arb_hypgeom/bessel_i_integration.c', - 'arb_hypgeom/bessel_k_integration.c', - 'arb_hypgeom/beta_lower_series.c', - 'arb_hypgeom/central_bin_ui.c', - 'arb_hypgeom/chi_series.c', - 'arb_hypgeom/ci.c', - 'arb_hypgeom/ci_series.c', - 'arb_hypgeom/coulomb.c', - 'arb_hypgeom/coulomb_jet.c', - 'arb_hypgeom/coulomb_series.c', - 'arb_hypgeom/ei_series.c', - 'arb_hypgeom/erf.c', - 'arb_hypgeom/erfc_series.c', - 'arb_hypgeom/erfinv.c', - 'arb_hypgeom/erfi_series.c', - 'arb_hypgeom/erf_series.c', - 'arb_hypgeom/fresnel_series.c', - 'arb_hypgeom/gamma.c', - 'arb_hypgeom/gamma_fmpq.c', - 'arb_hypgeom/gamma_lower_series.c', - 'arb_hypgeom/gamma_lower_sum_rs.c', - 'arb_hypgeom/gamma_stirling_sum_horner.c', - 'arb_hypgeom/gamma_stirling_sum_improved.c', - 'arb_hypgeom/gamma_stirling_term_bounds.c', - 'arb_hypgeom/gamma_tab.c', - 'arb_hypgeom/gamma_taylor.c', - 'arb_hypgeom/gamma_upper_fmpq.c', - 'arb_hypgeom/gamma_upper_fmpq_step_bsplit.c', - 'arb_hypgeom/gamma_upper_integration.c', - 'arb_hypgeom/gamma_upper_series.c', - 'arb_hypgeom/gamma_upper_sum_rs.c', - 'arb_hypgeom/legendre_p.c', - 'arb_hypgeom/legendre_p_ui_asymp.c', - 'arb_hypgeom/legendre_p_ui.c', - 'arb_hypgeom/legendre_p_ui_one.c', - 'arb_hypgeom/legendre_p_ui_rec.c', - 'arb_hypgeom/legendre_p_ui_root.c', - 'arb_hypgeom/legendre_p_ui_zero.c', - 'arb_hypgeom/lgamma.c', - 'arb_hypgeom/li_series.c', - 'arb_hypgeom/rising_ui_bs.c', - 'arb_hypgeom/rising_ui.c', - 'arb_hypgeom/rising_ui_forward.c', - 'arb_hypgeom/rising_ui_jet_bs.c', - 'arb_hypgeom/rising_ui_jet.c', - 'arb_hypgeom/rising_ui_jet_powsum.c', - 'arb_hypgeom/rising_ui_jet_rs.c', - 'arb_hypgeom/rising_ui_rec.c', - 'arb_hypgeom/rising_ui_rs.c', - 'arb_hypgeom/shi_series.c', - 'arb_hypgeom/si.c', - 'arb_hypgeom/si_series.c', - 'arb_hypgeom/sum_fmpq_arb_bs.c', - 'arb_hypgeom/sum_fmpq_arb.c', - 'arb_hypgeom/sum_fmpq_arb_forward.c', - 'arb_hypgeom/sum_fmpq_arb_rs.c', - 'arb_hypgeom/sum_fmpq_imag_arb_bs.c', - 'arb_hypgeom/sum_fmpq_imag_arb.c', - 'arb_hypgeom/sum_fmpq_imag_arb_forward.c', - 'arb_hypgeom/sum_fmpq_imag_arb_rs.c', - 'arb_hypgeom/u_integration.c', - 'arb_hypgeom/wrappers.c', - 'arb/hypot.c', - 'arb/indeterminate.c', - 'arb/inlines.c', - 'arb/intersection.c', - 'arb/io.c', - 'arb/is_finite.c', - 'arb/lambertw.c', - 'arb/log1p.c', - 'arb/log_arf.c', - 'arb/log_base_ui.c', - 'arb/log.c', - 'arb/log_hypot.c', - 'arb/log_newton.c', - 'arb/log_precompute_reductions.c', - 'arb/log_primes.c', - 'arb/log_reduce.c', - 'arb/log_tab.c', - 'arb/log_ui.c', - 'arb_mat/add.c', - 'arb_mat/addmul_rad_mag_fast.c', - 'arb_mat/approx_inv.c', - 'arb_mat/approx_lu.c', - 'arb_mat/approx_mul.c', - 'arb_mat/approx_solve.c', - 'arb_mat/approx_solve_lu_precomp.c', - 'arb_mat/approx_solve_tril.c', - 'arb_mat/approx_solve_triu.c', - 'arb_mat/bound_frobenius_norm.c', - 'arb_mat/bound_inf_norm.c', - 'arb_mat/charpoly.c', - 'arb_mat/cho.c', - 'arb_mat/clear.c', - 'arb_mat/companion.c', - 'arb_mat/contains.c', - 'arb_mat/contains_fmpq_mat.c', - 'arb_mat/contains_fmpz_mat.c', - 'arb_mat/count_is_zero.c', - 'arb_mat/dct.c', - 'arb_mat/det.c', - 'arb_mat/det_lu.c', - 'arb_mat/det_precond.c', - 'arb_mat/diag_prod.c', - 'arb_mat/entrywise_is_zero.c', - 'arb_mat/entrywise_not_is_zero.c', - 'arb_mat/eq.c', - 'arb_mat/equal.c', - 'arb_mat/exp.c', - 'arb_mat/exp_taylor_sum.c', - 'arb_mat/find_pivot_partial.c', - 'arb_mat/frobenius_norm.c', - 'arb_mat/hilbert.c', - 'arb_mat/indeterminate.c', - 'arb_mat/init.c', - 'arb_mat/inlines.c', - 'arb_mat/inv.c', - 'arb_mat/inv_cho_precomp.c', - 'arb_mat/inv_ldl_precomp.c', - 'arb_mat/io.c', - 'arb_mat/is_exact.c', - 'arb_mat/is_finite.c', - 'arb_mat/is_tril.c', - 'arb_mat/is_triu.c', - 'arb_mat/is_zero.c', - 'arb_mat/ldl.c', - 'arb_mat/lu.c', - 'arb_mat/lu_classical.c', - 'arb_mat/lu_recursive.c', - 'arb_mat/mul_block.c', - 'arb_mat/mul.c', - 'arb_mat/mul_classical.c', - 'arb_mat/mul_entrywise.c', - 'arb_mat/mul_threaded.c', - 'arb_mat/ne.c', - 'arb_mat/neg.c', - 'arb_mat/one.c', - 'arb_mat/ones.c', - 'arb_mat/overlaps.c', - 'arb_mat/pascal.c', - 'arb_mat/pow_ui.c', - 'arb_mat/randtest.c', - 'arb_mat/randtest_cho.c', - 'arb_mat/randtest_spd.c', - 'arb_mat/set.c', - 'arb_mat/set_fmpq_mat.c', - 'arb_mat/set_fmpz_mat.c', - 'arb_mat/set_round_fmpz_mat.c', - 'arb_mat/solve.c', - 'arb_mat/solve_cho_precomp.c', - 'arb_mat/solve_ldl_precomp.c', - 'arb_mat/solve_lu.c', - 'arb_mat/solve_lu_precomp.c', - 'arb_mat/solve_preapprox.c', - 'arb_mat/solve_precond.c', - 'arb_mat/solve_tril.c', - 'arb_mat/solve_triu.c', - 'arb_mat/spd_get_fmpz_mat.c', - 'arb_mat/spd_inv.c', - 'arb_mat/spd_is_lll_reduced.c', - 'arb_mat/spd_lll_reduce.c', - 'arb_mat/spd_solve.c', - 'arb_mat/sqr.c', - 'arb_mat/sqr_classical.c', - 'arb_mat/stirling.c', - 'arb_mat/sub.c', - 'arb_mat/trace.c', - 'arb_mat/transpose.c', - 'arb_mat/vector_mul.c', - 'arb_mat/window_init.c', - 'arb_mat/zero.c', - 'arb/max.c', - 'arb/min.c', - 'arb/minmax.c', - 'arb/mul_2exp_si.c', - 'arb/mul.c', - 'arb/neg.c', - 'arb/neg_round.c', - 'arb/nint.c', - 'arb/nonnegative_abs.c', - 'arb/nonnegative_part.c', - 'arb/one.c', - 'arb/overlaps.c', - 'arb/partitions_fmpz.c', - 'arb_poly/acos_series.c', - 'arb_poly/add.c', - 'arb_poly/add_series.c', - 'arb_poly/add_si.c', - 'arb_poly/asin_series.c', - 'arb_poly/atan_series.c', - 'arb_poly/binomial_transform_basecase.c', - 'arb_poly/binomial_transform.c', - 'arb_poly/binomial_transform_convolution.c', - 'arb_poly/borel_transform.c', - 'arb_poly/clear.c', - 'arb_poly/compose.c', - 'arb_poly/compose_series.c', - 'arb_poly/contains.c', - 'arb_poly/contains_fmpq_poly.c', - 'arb_poly/contains_fmpz_poly.c', - 'arb_poly/cosh_series.c', - 'arb_poly/cos_pi_series.c', - 'arb_poly/cos_series.c', - 'arb_poly/cot_pi_series.c', - 'arb_poly/derivative.c', - 'arb_poly/digamma_series.c', - 'arb_poly/divrem.c', - 'arb_poly/div_root.c', - 'arb_poly/div_series.c', - 'arb_poly/equal.c', - 'arb_poly/evaluate2_acb.c', - 'arb_poly/evaluate2_acb_horner.c', - 'arb_poly/evaluate2_acb_rectangular.c', - 'arb_poly/evaluate2.c', - 'arb_poly/evaluate2_horner.c', - 'arb_poly/evaluate2_rectangular.c', - 'arb_poly/evaluate_acb.c', - 'arb_poly/evaluate_acb_horner.c', - 'arb_poly/evaluate_acb_rectangular.c', - 'arb_poly/evaluate.c', - 'arb_poly/evaluate_horner.c', - 'arb_poly/evaluate_rectangular.c', - 'arb_poly/evaluate_vec_fast.c', - 'arb_poly/evaluate_vec_iter.c', - 'arb_poly/exp_series_basecase.c', - 'arb_poly/exp_series.c', - 'arb_poly/fit_length.c', - 'arb_poly/gamma_series.c', - 'arb_poly/get_coeff_arb.c', - 'arb_poly/get_unique_fmpz_poly.c', - 'arb_poly/graeffe_transform.c', - 'arb_poly/init.c', - 'arb_poly/inlines.c', - 'arb_poly/integral.c', - 'arb_poly/interpolate_barycentric.c', - 'arb_poly/interpolate_fast.c', - 'arb_poly/interpolate_newton.c', - 'arb_poly/inv_borel_transform.c', - 'arb_poly/inv_series.c', - 'arb_poly/io.c', - 'arb_poly/lambertw_series.c', - 'arb_poly/lgamma_series.c', - 'arb_poly/log1p_series.c', - 'arb/polylog.c', - 'arb_poly/log_series.c', - 'arb_poly/majorant.c', - 'arb_poly/mul.c', - 'arb_poly/mullow_block.c', - 'arb_poly/mullow.c', - 'arb_poly/mullow_classical.c', - 'arb_poly/newton_convergence_factor.c', - 'arb_poly/newton_refine_root.c', - 'arb_poly/newton_step.c', - 'arb_poly/normalise.c', - 'arb_poly/nth_derivative.c', - 'arb_poly/overlaps.c', - 'arb_poly/pow_arb_series.c', - 'arb_poly/pow_series.c', - 'arb_poly/pow_ui.c', - 'arb_poly/pow_ui_trunc_binexp.c', - 'arb_poly/product_roots.c', - 'arb_poly/product_roots_complex.c', - 'arb_poly/randtest.c', - 'arb_poly/reverse.c', - 'arb_poly/revert_series.c', - 'arb_poly/rgamma_series.c', - 'arb_poly/riemann_siegel_theta_series.c', - 'arb_poly/riemann_siegel_z_series.c', - 'arb_poly/rising_ui_series.c', - 'arb_poly/root_bound_fujiwara.c', - 'arb_poly/rsqrt_series.c', - 'arb_poly/set.c', - 'arb_poly/set_coeff_arb.c', - 'arb_poly/set_coeff_si.c', - 'arb_poly/set_fmpq_poly.c', - 'arb_poly/set_fmpz_poly.c', - 'arb_poly/set_length.c', - 'arb_poly/set_round.c', - 'arb_poly/set_si.c', - 'arb_poly/set_trunc.c', - 'arb_poly/set_trunc_round.c', - 'arb_poly/shift_left.c', - 'arb_poly/shift_right.c', - 'arb_poly/sin_cos_series.c', - 'arb_poly/sinc_pi_series.c', - 'arb_poly/sinc_series.c', - 'arb_poly/sinh_cosh_series_basecase.c', - 'arb_poly/sinh_cosh_series.c', - 'arb_poly/sinh_cosh_series_exponential.c', - 'arb_poly/sinh_series.c', - 'arb_poly/sin_pi_series.c', - 'arb_poly/sin_series.c', - 'arb_poly/sqrt_series.c', - 'arb_poly/sub.c', - 'arb_poly/sub_series.c', - 'arb_poly/swinnerton_dyer_ui.c', - 'arb_poly/tan_series.c', - 'arb_poly/taylor_shift.c', - 'arb_poly/tree.c', - 'arb_poly/valuation.c', - 'arb_poly/zeta_series.c', - 'arb/pow.c', - 'arb/power_sum_vec.c', - 'arb/pow_fmpq.c', - 'arb/pow_fmpz_binexp.c', - 'arb/pow_fmpz.c', - 'arb/primorial.c', - 'arb/randtest.c', - 'arb/rel_error_bits.c', - 'arb/richcmp.c', - 'arb/rising2_ui.c', - 'arb/rising_fmpq_ui.c', - 'arb/rising_ui.c', - 'arb/root_ui.c', - 'arb/sec.c', - 'arb/sech.c', - 'arb/set.c', - 'arb/set_interval.c', - 'arb/set_round.c', - 'arb/set_str.c', - 'arb/sgn.c', - 'arb/sgn_nonzero.c', - 'arb/sinc.c', - 'arb/sin_cos_arf_bb.c', - 'arb/sin_cos_arf_generic.c', - 'arb/sin_cos.c', - 'arb/sin_cos_generic.c', - 'arb/sin_cos_pi.c', - 'arb/sin_cos_pi_fmpq_algebraic.c', - 'arb/sin_cos_pi_fmpq.c', - 'arb/sin_cos_tab.c', - 'arb/sin_cos_taylor_naive.c', - 'arb/sin_cos_taylor_rs.c', - 'arb/sin_cos_wide.c', - 'arb/sinc_pi.c', - 'arb/sinh_cosh.c', - 'arb/sqrt1pm1.c', - 'arb/sqrt.c', - 'arb/sqrtpos.c', - 'arb/sub.c', - 'arb/submul.c', - 'arb/tan.c', - 'arb/tanh.c', - 'arb/tan_pi.c', - 'arb/trim.c', - 'arb/trunc.c', - 'arb/ui_pow_ui.c', - 'arb/union.c', - 'arb/urandom.c', - 'arb/vec_clear.c', - 'arb/vec_get_mag.c', - 'arb/vec_init.c', - 'arb/vec_set_powers.c', - 'arb/zero.c', - 'arb/zeta.c', - 'arb/zeta_ui_bernoulli.c', - 'arb/zeta_ui_borwein_bsplit.c', - 'arb/zeta_ui.c', - 'arb/zeta_ui_euler_product.c', - 'arb/zeta_ui_vec_borwein.c', - 'arb/zeta_ui_vec.c', - 'arb/zeta_ui_vec_even.c', - 'arb/zeta_ui_vec_odd.c', - 'arf/abs_bound_lt_2exp_si.c', - 'arf/add.c', - 'arf/add_mpn.c', - 'arf/addmul.c', - 'arf/approx_dot.c', - 'arf/call_mpfr_func.c', - 'arf/ceil.c', - 'arf/clear.c', - 'arf/cmp.c', - 'arf/complex_mul.c', - 'arf/debug.c', - 'arf/div.c', - 'arf/equal.c', - 'arf/floor.c', - 'arf/fma.c', - 'arf/frexp.c', - 'arf/get.c', - 'arf/inlines.c', - 'arf/io.c', - 'arf/is_int_2exp_si.c', - 'arf/is_int.c', - 'arf/memory_manager.c', - 'arf/mul_rnd_any.c', - 'arf/mul_rnd_down.c', - 'arf/mul_special.c', - 'arf/mul_tmp_cleanup.c', - 'arf/mul_via_mpfr.c', - 'arf/neg_round.c', - 'arf/randtest.c', - 'arf/root.c', - 'arf/rsqrt.c', - 'arf/set.c', - 'arf/set_round.c', - 'arf/sosq.c', - 'arf/sqrt.c', - 'arf/sub.c', - 'arf/submul.c', - 'arf/sum.c', - 'arf/urandom.c', - 'arith/bell_number.c', - 'arith/bell_number_dobinski.c', - 'arith/bell_number_multi_mod.c', - 'arith/bell_number_nmod.c', - 'arith/bell_number_nmod_vec.c', - 'arith/bell_number_nmod_vec_ogf.c', - 'arith/bell_number_nmod_vec_recursive.c', - 'arith/bell_number_nmod_vec_series.c', - 'arith/bell_number_size.c', - 'arith/bell_number_vec.c', - 'arith/bell_number_vec_multi_mod.c', - 'arith/bell_number_vec_recursive.c', - 'arith/bernoulli_number.c', - 'arith/bernoulli_number_denom.c', - 'arith/bernoulli_number_size.c', - 'arith/bernoulli_number_vec.c', - 'arith/bernoulli_number_vec_multi_mod.c', - 'arith/bernoulli_number_vec_recursive.c', - 'arith/bernoulli_polynomial.c', - 'arith/dedekind_cosine_sum_factored.c', - 'arith/divisors.c', - 'arith/euler_number.c', - 'arith/euler_number_size.c', - 'arith/euler_number_vec.c', - 'arith/euler_polynomial.c', - 'arith/harmonic_number.c', - 'arith/landau_function_vec.c', - 'arith/number_of_partitions.c', - 'arith/number_of_partitions_nmod_vec.c', - 'arith/number_of_partitions_vec.c', - 'arith/ramanujan_tau.c', - 'arith/stirling1.c', - 'arith/stirling2.c', - 'arith/stirlingmat.c', - 'arith/sum_of_squares.c', - 'arith/sum_of_squares_vec.c', - 'bernoulli/bound_2exp_si.c', - 'bernoulli/cache_compute.c', - 'bernoulli/fmpq_ui.c', - 'bernoulli/fmpq_ui_multi_mod.c', - 'bernoulli/fmpq_ui_zeta.c', - 'bernoulli/fmpq_vec.c', - 'bernoulli/mod_p_harvey.c', - 'bernoulli/rev_clear.c', - 'bernoulli/rev_init.c', - 'bernoulli/rev_next.c', - 'bool_mat/add.c', - 'bool_mat/all.c', - 'bool_mat/all_pairs_longest_walk.c', - 'bool_mat/any.c', - 'bool_mat/clear.c', - 'bool_mat/complement.c', - 'bool_mat/directed_cycle.c', - 'bool_mat/directed_path.c', - 'bool_mat/equal.c', - 'bool_mat/get_strongly_connected_components.c', - 'bool_mat/init.c', - 'bool_mat/io.c', - 'bool_mat/is_diagonal.c', - 'bool_mat/is_lower_triangular.c', - 'bool_mat/is_nilpotent.c', - 'bool_mat/is_transitive.c', - 'bool_mat/mul.c', - 'bool_mat/mul_entrywise.c', - 'bool_mat/nilpotency_degree.c', - 'bool_mat/one.c', - 'bool_mat/pow_ui.c', - 'bool_mat/randtest.c', - 'bool_mat/set.c', - 'bool_mat/trace.c', - 'bool_mat/transitive_closure.c', - 'bool_mat/transpose.c', - 'bool_mat/zero.c', - 'ca/abs.c', - 'ca/add.c', - 'ca/arg.c', - 'ca/asin.c', - 'ca/atan.c', - 'ca/can_evaluate_qqbar.c', - 'ca/ceil.c', - 'ca/check_equal.c', - 'ca/check_ge.c', - 'ca/check_is_algebraic.c', - 'ca/check_is_i.c', - 'ca/check_is_imaginary.c', - 'ca/check_is_infinity.c', - 'ca/check_is_integer.c', - 'ca/check_is_negative_real.c', - 'ca/check_is_neg_i.c', - 'ca/check_is_neg_i_inf.c', - 'ca/check_is_neg_inf.c', - 'ca/check_is_neg_one.c', - 'ca/check_is_number.c', - 'ca/check_is_one.c', - 'ca/check_is_pos_i_inf.c', - 'ca/check_is_pos_inf.c', - 'ca/check_is_rational.c', - 'ca/check_is_real.c', - 'ca/check_is_signed_inf.c', - 'ca/check_is_uinf.c', - 'ca/check_is_undefined.c', - 'ca/check_is_zero.c', - 'ca/clear.c', - 'ca/condense_field.c', - 'ca/conj.c', - 'ca/csgn.c', - 'ca/ctx_clear.c', - 'ca/ctx_get_field_const.c', - 'ca/ctx_get_field_fx.c', - 'ca/ctx_get_field_fxy.c', - 'ca/ctx_init.c', - 'ca/div.c', - 'ca/dot.c', - 'ca/equal_repr.c', - 'ca/erf.c', - 'ca/erfc.c', - 'ca/erfi.c', - 'ca/euler.c', - 'ca/exp.c', - 'ca_ext/cache_clear.c', - 'ca_ext/cache_init.c', - 'ca_ext/cache_insert.c', - 'ca_ext/clear.c', - 'ca_ext/cmp_repr.c', - 'ca_ext/equal_repr.c', - 'ca_ext/get_acb_raw.c', - 'ca_ext/init.c', - 'ca_ext/inlines.c', - 'ca_ext/print.c', - 'ca/factor.c', - 'ca/factor_clear.c', - 'ca/factor_get_ca.c', - 'ca/factor_init.c', - 'ca/factor_insert.c', - 'ca/factor_one.c', - 'ca_field/build_ideal.c', - 'ca_field/build_ideal_erf.c', - 'ca_field/build_ideal_gamma.c', - 'ca_field/cache_clear.c', - 'ca_field/cache_init.c', - 'ca_field/cache_insert.c', - 'ca_field/clear.c', - 'ca_field/cmp.c', - 'ca_field/init.c', - 'ca_field/print.c', - 'ca_field/set_ext.c', - 'ca/floor.c', - 'ca/fmpq_poly_evaluate.c', - 'ca/fmpz_mpoly_evaluate.c', - 'ca/fmpz_mpoly_q_evaluate.c', - 'ca/fmpz_poly_evaluate.c', - 'ca/gamma.c', - 'ca/get_acb.c', - 'ca/get_acb_raw.c', - 'ca/get_fexpr.c', - 'ca/get_qqbar.c', - 'ca/hash_repr.c', - 'ca/i.c', - 'ca/im.c', - 'ca/init.c', - 'ca/inlines.c', - 'ca/inv.c', - 'ca/io.c', - 'ca/is_cyclotomic_nf_elem.c', - 'ca/is_gen_as_ext.c', - 'calcium/func_name.c', - 'calcium/io.c', - 'calcium/write_acb.c', - 'calcium/write.c', - 'calcium/write_si.c', - 'ca/log.c', - 'ca/make_field_element.c', - 'ca_mat/add.c', - 'ca_mat/add_ca.c', - 'ca_mat/addmul_ca.c', - 'ca_mat/adjugate.c', - 'ca_mat/adjugate_charpoly.c', - 'ca_mat/adjugate_cofactor.c', - 'ca_mat/ca_poly_evaluate.c', - 'ca_mat/charpoly_berkowitz.c', - 'ca_mat/charpoly.c', - 'ca_mat/charpoly_danilevsky.c', - 'ca_mat/check_equal.c', - 'ca_mat/check_is_one.c', - 'ca_mat/check_is_zero.c', - 'ca_mat/clear.c', - 'ca_mat/companion.c', - 'ca_mat/conj.c', - 'ca_mat/conj_transpose.c', - 'ca_mat/det_bareiss.c', - 'ca_mat/det_berkowitz.c', - 'ca_mat/det.c', - 'ca_mat/det_cofactor.c', - 'ca_mat/det_lu.c', - 'ca_mat/dft.c', - 'ca_mat/diagonalization.c', - 'ca_mat/eigenvalues.c', - 'ca_mat/exp.c', - 'ca_mat/fflu.c', - 'ca_mat/find_pivot.c', - 'ca_mat/get_fexpr.c', - 'ca_mat/hilbert.c', - 'ca_mat/init.c', - 'ca_mat/inlines.c', - 'ca_mat/inv.c', - 'ca_mat/jordan_blocks.c', - 'ca_mat/jordan_form.c', - 'ca_mat/jordan_transformation.c', - 'ca_mat/log.c', - 'ca_mat/lu.c', - 'ca_mat/lu_classical.c', - 'ca_mat/lu_recursive.c', - 'ca_mat/mul.c', - 'ca_mat/mul_classical.c', - 'ca_mat/mul_same_nf.c', - 'ca_mat/neg.c', - 'ca_mat/nonsingular_fflu.c', - 'ca_mat/nonsingular_lu.c', - 'ca_mat/nonsingular_solve_adjugate.c', - 'ca_mat/nonsingular_solve.c', - 'ca_mat/nonsingular_solve_fflu.c', - 'ca_mat/nonsingular_solve_lu.c', - 'ca_mat/one.c', - 'ca_mat/ones.c', - 'ca_mat/pascal.c', - 'ca_mat/pow_ui_binexp.c', - 'ca_mat/print.c', - 'ca_mat/randops.c', - 'ca_mat/randtest.c', - 'ca_mat/rank.c', - 'ca_mat/right_kernel.c', - 'ca_mat/rref.c', - 'ca_mat/rref_fflu.c', - 'ca_mat/rref_lu.c', - 'ca_mat/set.c', - 'ca_mat/set_ca.c', - 'ca_mat/set_fmpq_mat.c', - 'ca_mat/set_fmpz_mat.c', - 'ca_mat/solve_fflu_precomp.c', - 'ca_mat/solve_lu_precomp.c', - 'ca_mat/solve_tril.c', - 'ca_mat/solve_triu.c', - 'ca_mat/stirling.c', - 'ca_mat/sub.c', - 'ca_mat/sub_ca.c', - 'ca_mat/submul_ca.c', - 'ca_mat/trace.c', - 'ca_mat/transfer.c', - 'ca_mat/transpose.c', - 'ca_mat/window_init.c', - 'ca_mat/zero.c', - 'ca/merge_fields.c', - 'ca/mul.c', - 'ca/neg.c', - 'ca/neg_i.c', - 'ca/neg_i_inf.c', - 'ca/neg_inf.c', - 'ca/neg_one.c', - 'ca/one.c', - 'ca/pi.c', - 'ca/pi_i.c', - 'ca_poly/add.c', - 'ca_poly/check_equal.c', - 'ca_poly/check_is_one.c', - 'ca_poly/check_is_zero.c', - 'ca_poly/clear.c', - 'ca_poly/compose.c', - 'ca_poly/derivative.c', - 'ca_poly/divrem_basecase.c', - 'ca_poly/divrem.c', - 'ca_poly/div_series.c', - 'ca_poly/evaluate.c', - 'ca_poly/evaluate_horner.c', - 'ca_poly/exp_series.c', - 'ca_poly/factor_squarefree.c', - 'ca_poly/fit_length.c', - 'ca_poly/gcd.c', - 'ca_poly/gcd_euclidean.c', - 'ca_poly/get_fexpr.c', - 'ca_poly/init.c', - 'ca_poly/inlines.c', - 'ca_poly/integral.c', - 'ca_poly/inv_series.c', - 'ca_poly/is_proper.c', - 'ca_poly/log_series.c', - 'ca_poly/make_monic.c', - 'ca_poly/mul.c', - 'ca_poly/mullow.c', - 'ca_poly/mullow_same_nf.c', - 'ca_poly/neg.c', - 'ca_poly/normalise.c', - 'ca_poly/pow_ui.c', - 'ca_poly/pow_ui_trunc.c', - 'ca_poly/print.c', - 'ca_poly/randtest.c', - 'ca_poly/reverse.c', - 'ca_poly/roots.c', - 'ca_poly/set.c', - 'ca_poly/set_ca.c', - 'ca_poly/set_coeff_ca.c', - 'ca_poly/set_fmpq_poly.c', - 'ca_poly/set_fmpz_poly.c', - 'ca_poly/set_length.c', - 'ca_poly/set_roots.c', - 'ca_poly/set_si.c', - 'ca_poly/shift_left.c', - 'ca_poly/shift_right.c', - 'ca_poly/squarefree_part.c', - 'ca_poly/sub.c', - 'ca_poly/transfer.c', - 'ca_poly/vec_append.c', - 'ca_poly/vec_clear.c', - 'ca_poly/vec_init.c', - 'ca_poly/vec_set_length.c', - 'ca/pos_i_inf.c', - 'ca/pos_inf.c', - 'ca/pow.c', - 'ca/randtest.c', - 'ca/re.c', - 'ca/rewrite_complex_normal_form.c', - 'ca/set.c', - 'ca/set_d.c', - 'ca/set_d_d.c', - 'ca/set_fexpr.c', - 'ca/set_fmpq.c', - 'ca/set_fmpz.c', - 'ca/set_qqbar.c', - 'ca/set_si.c', - 'ca/set_ui.c', - 'ca/sgn.c', - 'ca/sin_cos.c', - 'ca/sqrt.c', - 'ca/sqrt_factor.c', - 'ca/swap.c', - 'ca/transfer.c', - 'ca/uinf.c', - 'ca/undefined.c', - 'ca/unknown.c', - 'ca_vec/ca_vec.c', - 'ca_vec/inlines.c', - 'ca/zero.c', - 'dirichlet/char.c', - 'dirichlet/char_conductor.c', - 'dirichlet/char_eq_deep.c', - 'dirichlet/char_exp.c', - 'dirichlet/char_first_primitive.c', - 'dirichlet/char_index.c', - 'dirichlet/char_lift.c', - 'dirichlet/char_log.c', - 'dirichlet/char_lower.c', - 'dirichlet/char_mul.c', - 'dirichlet/char_next.c', - 'dirichlet/char_next_primitive.c', - 'dirichlet/char_one.c', - 'dirichlet/char_order.c', - 'dirichlet/char_parity.c', - 'dirichlet/char_pow.c', - 'dirichlet/char_print.c', - 'dirichlet/chi.c', - 'dirichlet/chi_vec.c', - 'dirichlet/chi_vec_loop.c', - 'dirichlet/chi_vec_primeloop.c', - 'dirichlet/group_clear.c', - 'dirichlet/group_dlog_precompute.c', - 'dirichlet/group_init.c', - 'dirichlet/group_num_primitive.c', - 'dirichlet/index_char.c', - 'dirichlet/inlines.c', - 'dirichlet/pairing.c', - 'dirichlet/pairing_char.c', - 'dirichlet/ui_conductor.c', - 'dirichlet/ui_order.c', - 'dirichlet/ui_parity.c', - 'dirichlet/ui_vec_set_null.c', - 'dlog/1modpe.c', - 'dlog/1modpe_init.c', - 'dlog/1modpe_mod1p.c', - 'dlog/bsgs.c', - 'dlog/bsgs_init.c', - 'dlog/crt.c', - 'dlog/crt_clear.c', - 'dlog/crt_init.c', - 'dlog/factor_group.c', - 'dlog/mod2e.c', - 'dlog/modpe.c', - 'dlog/modpe_init.c', - 'dlog/once.c', - 'dlog/order23.c', - 'dlog/order23_init.c', - 'dlog/power.c', - 'dlog/power_init.c', - 'dlog/precomp.c', - 'dlog/precomp_clear.c', - 'dlog/precomp_modpe_init.c', - 'dlog/precomp_n_init.c', - 'dlog/precomp_pe_init.c', - 'dlog/precomp_p_init.c', - 'dlog/precomp_small_init.c', - 'dlog/rho.c', - 'dlog/rho_init.c', - 'dlog/table.c', - 'dlog/table_init.c', - 'dlog/vec_add.c', - 'dlog/vec_add_precomp.c', - 'dlog/vec.c', - 'dlog/vec_eratos_add.c', - 'dlog/vec_eratos.c', - 'dlog/vec_fill.c', - 'dlog/vec_loop_add.c', - 'dlog/vec_loop.c', - 'dlog/vec_pindex_factorgcd.c', - 'dlog/vec_set_not_found.c', - 'dlog/vec_sieve_add.c', - 'dlog/vec_sieve_add_precomp.c', - 'dlog/vec_sieve.c', - 'dlog/vec_sieve_precomp.c', - 'd_mat/approx_equal.c', - 'd_mat/clear.c', - 'd_mat/equal.c', - 'd_mat/init.c', - 'd_mat/inlines.c', - 'd_mat/mul_classical.c', - 'd_mat/print.c', - 'd_mat/randtest.c', - 'd_mat/set.c', - 'd_mat/transpose.c', - 'd_mat/zero.c', - 'double_extras/inlines.c', - 'double_extras/lambertw.c', - 'double_extras/log2.c', - 'double_extras/randtest.c', - 'double_extras/randtest_signed.c', - 'double_extras/randtest_special.c', - 'double_interval/arb_get_di.c', - 'double_interval/arb_set_di.c', - 'double_interval/fast_div.c', - 'double_interval/fast_log_nonnegative.c', - 'double_interval/fast_mul.c', - 'double_interval/fast_sqr.c', - 'double_interval/inlines.c', - 'd_vec/add.c', - 'd_vec/approx_equal.c', - 'd_vec/clear.c', - 'd_vec/dot.c', - 'd_vec/dot_heuristic.c', - 'd_vec/dot_thrice.c', - 'd_vec/equal.c', - 'd_vec/init.c', - 'd_vec/inlines.c', - 'd_vec/is_approx_zero.c', - 'd_vec/is_zero.c', - 'd_vec/norm.c', - 'd_vec/randtest.c', - 'd_vec/set.c', - 'd_vec/sub.c', - 'd_vec/zero.c', - 'fexpr/arg.c', - 'fexpr/arithmetic.c', - 'fexpr/arithmetic_nodes.c', - 'fexpr_builtin/inlines.c', - 'fexpr_builtin/lookup.c', - 'fexpr_builtin/table.c', - 'fexpr/call0.c', - 'fexpr/call1.c', - 'fexpr/call2.c', - 'fexpr/call3.c', - 'fexpr/call4.c', - 'fexpr/call_vec.c', - 'fexpr/cmp_fast.c', - 'fexpr/contains.c', - 'fexpr/depth.c', - 'fexpr/equal_si.c', - 'fexpr/equal_ui.c', - 'fexpr/expanded_normal_form.c', - 'fexpr/func.c', - 'fexpr/get_fmpz.c', - 'fexpr/get_fmpz_mpoly_q.c', - 'fexpr/get_string.c', - 'fexpr/get_symbol_str.c', - 'fexpr/hash.c', - 'fexpr/inlines.c', - 'fexpr/is_any_builtin_call.c', - 'fexpr/is_arithmetic_operation.c', - 'fexpr/is_builtin_call.c', - 'fexpr/is_neg_integer.c', - 'fexpr/numerical_enclosure.c', - 'fexpr/num_leaves.c', - 'fexpr/print.c', - 'fexpr/replace.c', - 'fexpr/set_arf.c', - 'fexpr/set_d.c', - 'fexpr/set_fmpq.c', - 'fexpr/set_fmpz.c', - 'fexpr/set_fmpz_mpoly.c', - 'fexpr/set_fmpz_mpoly_q.c', - 'fexpr/set_si.c', - 'fexpr/set_string.c', - 'fexpr/set_symbol_str.c', - 'fexpr/set_ui.c', - 'fexpr/vec_sort_fast.c', - 'fexpr/write_latex.c', - 'fft/adjust.c', - 'fft/adjust_sqrt2.c', - 'fft/butterfly_lshB.c', - 'fft/butterfly_rshB.c', - 'fft/combine_bits.c', - 'fft/convolution.c', - 'fft/convolution_precache.c', - 'fft/div_2expmod_2expp1.c', - 'fft/fermat_to_mpz.c', - 'fft/fft_mfa_truncate_sqrt2.c', - 'fft/fft_mfa_truncate_sqrt2_inner.c', - 'fft/fft_negacylic.c', - 'fft/fft_radix2.c', - 'fft/fft_truncate.c', - 'fft/fft_truncate_sqrt2.c', - 'fft/ifft_mfa_truncate_sqrt2.c', - 'fft/ifft_negacyclic.c', - 'fft/ifft_radix2.c', - 'fft/ifft_truncate.c', - 'fft/ifft_truncate_sqrt2.c', - 'fft/inlines.c', - 'fft/mul_2expmod_2expp1.c', - 'fft/mul_fft_main.c', - 'fft/mul_mfa_truncate_sqrt2.c', - 'fft/mulmod_2expp1.c', - 'fft/mul_truncate_sqrt2.c', - 'fft/negmod_2expp1.c', - 'fft/normmod_2expp1.c', - # These are added by detection/meson.build conditionally. - #'fft_small/default_ctx.c', - #'fft_small/fmpz_poly_mul.c', - #'fft_small/mpn_helpers.c', - #'fft_small/mpn_mul.c', - #'fft_small/mulmod_statisfies_bounds.c', - #'fft_small/nmod_poly_mul.c', - #'fft_small/sd_fft.c', - #'fft_small/sd_fft_ctx.c', - #'fft_small/sd_ifft.c', - 'fft/split_bits.c', - 'fmpq/add.c', - 'fmpq/addmul.c', - 'fmpq/ball.c', - 'fmpq/canonicalise.c', - 'fmpq/cfrac_bound.c', - 'fmpq/clear_readonly.c', - 'fmpq/cmp.c', - 'fmpq/dedekind_sum.c', - 'fmpq/div_2exp.c', - 'fmpq/div.c', - 'fmpq/farey_neighbors.c', - 'fmpq/fmpz_vector.c', - 'fmpq/gcd.c', - 'fmpq/gcd_cofactors.c', - 'fmpq/get_cfrac.c', - 'fmpq/get_cfrac_helpers.c', - 'fmpq/get_d.c', - 'fmpq/get_mpfr.c', - 'fmpq/get_mpz_frac.c', - 'fmpq/get_str.c', - 'fmpq/harmonic_ui.c', - 'fmpq/height_bits.c', - 'fmpq/height.c', - 'fmpq/init_set_readonly.c', - 'fmpq/inlines.c', - 'fmpq/inv.c', - 'fmpq/io.c', - 'fmpq/is_canonical.c', - 'fmpq/mat22.c', - 'fmpq_mat/add.c', - 'fmpq_mat/can_solve.c', - 'fmpq_mat/can_solve_dixon.c', - 'fmpq_mat/can_solve_fraction_free.c', - 'fmpq_mat/can_solve_multi_mod.c', - 'fmpq_mat/charpoly.c', - 'fmpq_mat/clear.c', - 'fmpq_mat/concat_horizontal.c', - 'fmpq_mat/concat_vertical.c', - 'fmpq_mat/det.c', - 'fmpq_mat/equal.c', - 'fmpq_mat/fmpq_vec_mul.c', - 'fmpq_mat/fmpz_vec_mul.c', - 'fmpq_mat/get_fmpz_mat.c', - 'fmpq_mat/get_fmpz_mat_colwise.c', - 'fmpq_mat/get_fmpz_mat_entrywise.c', - 'fmpq_mat/get_fmpz_mat_matwise.c', - 'fmpq_mat/get_fmpz_mat_mod_fmpz.c', - 'fmpq_mat/get_fmpz_mat_rowwise.c', - 'fmpq_mat/gso.c', - 'fmpq_mat/hilbert_matrix.c', - 'fmpq_mat/init.c', - 'fmpq_mat/init_set.c', - 'fmpq_mat/inlines.c', - 'fmpq_mat/inv.c', - 'fmpq_mat/invert.c', - 'fmpq_mat/io.c', - 'fmpq_mat/is_integral.c', - 'fmpq_mat/is_one.c', - 'fmpq_mat/is_zero.c', - 'fmpq_mat/kronecker_product.c', - 'fmpq_mat/minpoly.c', - 'fmpq_mat/mul.c', - 'fmpq_mat/mul_cleared.c', - 'fmpq_mat/mul_direct.c', - 'fmpq_mat/mul_fmpq_vec.c', - 'fmpq_mat/mul_fmpz_mat.c', - 'fmpq_mat/mul_fmpz_vec.c', - 'fmpq_mat/mul_r_fmpz_mat.c', - 'fmpq_mat/neg.c', - 'fmpq_mat/one.c', - 'fmpq_mat/pivot.c', - 'fmpq_mat/randbits.c', - 'fmpq_mat/randtest.c', - 'fmpq_mat/rref.c', - 'fmpq_mat/rref_classical.c', - 'fmpq_mat/rref_fraction_free.c', - 'fmpq_mat/scalar_div_fmpz.c', - 'fmpq_mat/scalar_mul_fmpq.c', - 'fmpq_mat/scalar_mul_fmpz.c', - 'fmpq_mat/set.c', - 'fmpq_mat/set_fmpz_mat.c', - 'fmpq_mat/set_fmpz_mat_div_fmpz.c', - 'fmpq_mat/set_fmpz_mat_mod_fmpz.c', - 'fmpq_mat/similarity.c', - 'fmpq_mat/solve.c', - 'fmpq_mat/solve_dixon.c', - 'fmpq_mat/solve_fraction_free.c', - 'fmpq_mat/solve_multi_mod.c', - 'fmpq_mat/sub.c', - 'fmpq_mat/swap.c', - 'fmpq_mat/trace.c', - 'fmpq_mat/transpose.c', - 'fmpq_mat/window_clear.c', - 'fmpq_mat/window_init.c', - 'fmpq_mat/zero.c', - 'fmpq/mod_fmpz.c', - 'fmpq_mpoly/add.c', - 'fmpq_mpoly/add_fmpq.c', - 'fmpq_mpoly/cmp.c', - 'fmpq_mpoly/compose_fmpq_mpoly.c', - 'fmpq_mpoly/compose_fmpq_mpoly_gen.c', - 'fmpq_mpoly/compose_fmpq_poly.c', - 'fmpq_mpoly/content_vars.c', - 'fmpq_mpoly/degrees.c', - 'fmpq_mpoly/derivative.c', - 'fmpq_mpoly/discriminant.c', - 'fmpq_mpoly/div.c', - 'fmpq_mpoly/divides.c', - 'fmpq_mpoly/divrem.c', - 'fmpq_mpoly/divrem_ideal.c', - 'fmpq_mpoly/equal_fmpq.c', - 'fmpq_mpoly/equal_fmpz.c', - 'fmpq_mpoly/evaluate_all.c', - 'fmpq_mpoly/evaluate_one.c', - 'fmpq_mpoly_factor/clear.c', - 'fmpq_mpoly_factor/expand.c', - 'fmpq_mpoly_factor/factor.c', - 'fmpq_mpoly_factor/factor_make_integral.c', - 'fmpq_mpoly_factor/factor_make_monic.c', - 'fmpq_mpoly_factor/factor_squarefree.c', - 'fmpq_mpoly_factor/fit_length.c', - 'fmpq_mpoly_factor/init.c', - 'fmpq_mpoly_factor/inlines.c', - 'fmpq_mpoly_factor/realloc.c', - 'fmpq_mpoly_factor/sort.c', - 'fmpq_mpoly_factor/swap_fmpz_mpoly_factor.c', - 'fmpq_mpoly/gcd.c', - 'fmpq_mpoly/gcd_cofactors.c', - 'fmpq_mpoly/get_coeff_fmpq_fmpz.c', - 'fmpq_mpoly/get_coeff_fmpq_monomial.c', - 'fmpq_mpoly/get_coeff_fmpq_ui.c', - 'fmpq_mpoly/get_coeff_vars_ui.c', - 'fmpq_mpoly/get_fmpq.c', - 'fmpq_mpoly/get_set_is_fmpq_poly.c', - 'fmpq_mpoly/get_str_pretty.c', - 'fmpq_mpoly/get_term.c', - 'fmpq_mpoly/get_term_coeff_fmpq.c', - 'fmpq_mpoly/get_term_exp_fmpz.c', - 'fmpq_mpoly/get_term_exp_si.c', - 'fmpq_mpoly/get_term_exp_ui.c', - 'fmpq_mpoly/get_term_monomial.c', - 'fmpq_mpoly/get_term_var_exp_si.c', - 'fmpq_mpoly/get_term_var_exp_ui.c', - 'fmpq_mpoly/inflate.c', - 'fmpq_mpoly/inlines.c', - 'fmpq_mpoly/integral.c', - 'fmpq_mpoly/io.c', - 'fmpq_mpoly/is_canonical.c', - 'fmpq_mpoly/is_monic.c', - 'fmpq_mpoly/make_monic.c', - 'fmpq_mpoly/mul.c', - 'fmpq_mpoly/pow_fmpz.c', - 'fmpq_mpoly/pow_ui.c', - 'fmpq_mpoly/push_term_fmpq_fmpz.c', - 'fmpq_mpoly/push_term_fmpq_ui.c', - 'fmpq_mpoly/reduce.c', - 'fmpq_mpoly/reduce_easy.c', - 'fmpq_mpoly/repack_bits.c', - 'fmpq_mpoly/rescale.c', - 'fmpq_mpoly/resultant.c', - 'fmpq_mpoly/scalar_div_fmpq.c', - 'fmpq_mpoly/scalar_div_fmpz.c', - 'fmpq_mpoly/scalar_mul_fmpq.c', - 'fmpq_mpoly/scalar_mul_fmpz.c', - 'fmpq_mpoly/set_coeff_fmpq_fmpz.c', - 'fmpq_mpoly/set_coeff_fmpq_monomial.c', - 'fmpq_mpoly/set_coeff_fmpq_ui.c', - 'fmpq_mpoly/set_fmpq.c', - 'fmpq_mpoly/set_fmpz.c', - 'fmpq_mpoly/set_str_pretty.c', - 'fmpq_mpoly/set_term_coeff_fmpq.c', - 'fmpq_mpoly/sqrt.c', - 'fmpq_mpoly/sub.c', - 'fmpq_mpoly/sub_fmpq.c', - 'fmpq_mpoly/term_content.c', - 'fmpq_mpoly/term_exp_fits.c', - 'fmpq_mpoly/univar.c', - 'fmpq_mpoly/void_ring.c', - 'fmpq/mpq_clear_readonly.c', - 'fmpq/mpq_init_set_readonly.c', - 'fmpq/mul_2exp.c', - 'fmpq/mul.c', - 'fmpq/next_calkin_wilf.c', - 'fmpq/next_minimal.c', - 'fmpq/next_signed_calkin_wilf.c', - 'fmpq/next_signed_minimal.c', - 'fmpq_poly/add.c', - 'fmpq_poly/add_series.c', - 'fmpq_poly/asinh_series.c', - 'fmpq_poly/asin_series.c', - 'fmpq_poly/atanh_series.c', - 'fmpq_poly/atan_series.c', - 'fmpq_poly/canonicalise.c', - 'fmpq_poly/clear.c', - 'fmpq_poly/cmp.c', - 'fmpq_poly/comparisons.c', - 'fmpq_poly/compose.c', - 'fmpq_poly/compose_series_brent_kung.c', - 'fmpq_poly/compose_series.c', - 'fmpq_poly/compose_series_horner.c', - 'fmpq_poly/content.c', - 'fmpq_poly/cosh_series.c', - 'fmpq_poly/cos_series.c', - 'fmpq_poly/derivative.c', - 'fmpq_poly/div.c', - 'fmpq_poly/divides.c', - 'fmpq_poly/divrem.c', - 'fmpq_poly/div_series.c', - 'fmpq_poly/equal.c', - 'fmpq_poly/equal_trunc.c', - 'fmpq_poly/evaluate.c', - 'fmpq_poly/exp_series.c', - 'fmpq_poly/fit_length.c', - 'fmpq_poly/gcd.c', - 'fmpq_poly/gegenbauer_c.c', - 'fmpq_poly/get_coeff.c', - 'fmpq_poly/get_nmod_poly.c', - 'fmpq_poly/get_numerator_denominator.c', - 'fmpq_poly/get_slice.c', - 'fmpq_poly/get_str.c', - 'fmpq_poly/init.c', - 'fmpq_poly/inlines.c', - 'fmpq_poly/integral.c', - 'fmpq_poly/interpolate_fmpz_vec.c', - 'fmpq_poly/inv.c', - 'fmpq_poly/inv_series_newton.c', - 'fmpq_poly/invsqrt_series.c', - 'fmpq_poly/io.c', - 'fmpq_poly/is_canonical.c', - 'fmpq_poly/is_monic.c', - 'fmpq_poly/is_squarefree.c', - 'fmpq_poly/laguerre_l.c', - 'fmpq_poly/lcm.c', - 'fmpq_poly/legendre_p.c', - 'fmpq_poly/log_series.c', - 'fmpq_poly/make_monic.c', - 'fmpq_poly/mul.c', - 'fmpq_poly/mullow.c', - 'fmpq_poly/neg.c', - 'fmpq_poly/normalise.c', - 'fmpq_poly/nth_derivative.c', - 'fmpq_poly/one.c', - 'fmpq_poly/pow.c', - 'fmpq_poly/powers_clear.c', - 'fmpq_poly/powers_precompute.c', - 'fmpq_poly/power_sums.c', - 'fmpq_poly/power_sums_to_poly.c', - 'fmpq_poly/pow_trunc.c', - 'fmpq_poly/primitive_part.c', - 'fmpq_poly/randtest.c', - 'fmpq_poly/realloc.c', - 'fmpq_poly/rem.c', - 'fmpq_poly/remove.c', - 'fmpq_poly/rem_powers_precomp.c', - 'fmpq_poly/rescale.c', - 'fmpq_poly/resultant.c', - 'fmpq_poly/resultant_modular_div.c', - 'fmpq_poly/reverse.c', - 'fmpq_poly/revert_series.c', - 'fmpq_poly/revert_series_lagrange.c', - 'fmpq_poly/revert_series_lagrange_fast.c', - 'fmpq_poly/revert_series_newton.c', - 'fmpq_poly/scalar.c', - 'fmpq_poly/set.c', - 'fmpq_poly/set_coeff.c', - 'fmpq_poly/set_length.c', - 'fmpq_poly/set_str.c', - 'fmpq_poly/set_trunc.c', - 'fmpq_poly/shift_left.c', - 'fmpq_poly/shift_right.c', - 'fmpq_poly/sin_cos_series.c', - 'fmpq_poly/sinh_cosh_series.c', - 'fmpq_poly/sinh_series.c', - 'fmpq_poly/sin_series.c', - 'fmpq_poly/sqrt_series.c', - 'fmpq_poly/sub.c', - 'fmpq_poly/sub_series.c', - 'fmpq_poly/swap.c', - 'fmpq_poly/tanh_series.c', - 'fmpq_poly/tan_series.c', - 'fmpq_poly/truncate.c', - 'fmpq_poly/xgcd.c', - 'fmpq_poly/zero.c', - 'fmpq/pow_fmpz.c', - 'fmpq/pow_si.c', - 'fmpq/randbits.c', - 'fmpq/randtest.c', - 'fmpq/reconstruct_fmpz_2.c', - 'fmpq/reconstruct_fmpz_2_naive.c', - 'fmpq/reconstruct_fmpz.c', - 'fmpq/set_cfrac.c', - 'fmpq/set_fmpz_frac.c', - 'fmpq/set_si.c', - 'fmpq/set_str.c', - 'fmpq/set_ui.c', - 'fmpq/simplest_between.c', - 'fmpq/sub.c', - 'fmpq/submul.c', - 'fmpq_vec/clear.c', - 'fmpq_vec/dot.c', - 'fmpq_vec/get_fmpz_vec_fmpz.c', - 'fmpq_vec/init.c', - 'fmpq_vec/io.c', - 'fmpq_vec/randtest.c', - 'fmpq_vec/randtest_uniq_sorted.c', - 'fmpq_vec/set_fmpz_vec.c', - 'fmpq_vec/sort.c', - 'fmpz/abs.c', - 'fmpz/abs_fits_ui.c', - 'fmpz/abs_lbound_ui_2exp.c', - 'fmpz/abs_ubound_ui_2exp.c', - 'fmpz/add.c', - 'fmpz/addmul.c', - 'fmpz/aors_ui.c', - 'fmpz/bin_uiui.c', - 'fmpz/bit_pack.c', - 'fmpz/bits.c', - 'fmpz/bit_unpack.c', - 'fmpz/cdiv.c', - 'fmpz/clear_readonly.c', - 'fmpz/clog.c', - 'fmpz/cmp.c', - 'fmpz/comb_clear.c', - 'fmpz/comb_init.c', - 'fmpz/CRT.c', - 'fmpz/divexact.c', - 'fmpz/divides.c', - 'fmpz/divides_mod_list.c', - 'fmpz/divisible.c', - 'fmpz/divisor_in_residue_class_lenstra.c', - 'fmpz/divisor_sigma.c', - 'fmpz/div_newton.c', - 'fmpz/dlog.c', - 'fmpz/equal.c', - 'fmpz/euler_phi.c', - 'fmpz_extras/lshift_mpn.c', - 'fmpz_extras/sub_small_large.c', - 'fmpz_factor/append.c', - 'fmpz_factor/clear.c', - 'fmpz_factor/concat.c', - 'fmpz_factor/ecm_add.c', - 'fmpz_factor/ecm_addmod.c', - 'fmpz_factor/ecm.c', - 'fmpz_factor/ecm_clear.c', - 'fmpz_factor/ecm_double.c', - 'fmpz_factor/ecm_init.c', - 'fmpz_factor/ecm_mul_montgomery_ladder.c', - 'fmpz_factor/ecm_select_curve.c', - 'fmpz_factor/ecm_stage_I.c', - 'fmpz_factor/ecm_stage_II.c', - 'fmpz_factor/ecm_submod.c', - 'fmpz_factor/expand.c', - 'fmpz_factor/expand_iterative.c', - 'fmpz_factor/expand_multiexp.c', - 'fmpz_factor/extend_factor_ui.c', - 'fmpz_factor/factor.c', - 'fmpz_factor/factor_no_trial.c', - 'fmpz_factor/factor_pp1.c', - 'fmpz_factor/factor_si.c', - 'fmpz_factor/factor_smooth.c', - 'fmpz_factor/factor_trial.c', - 'fmpz_factor/factor_trial_range.c', - 'fmpz_factor/fit_length.c', - 'fmpz_factor/get_fmpz.c', - 'fmpz_factor/init.c', - 'fmpz_factor/io.c', - 'fmpz_factor/pollard_brent.c', - 'fmpz_factor/pollard_brent_single.c', - 'fmpz_factor/refine.c', - 'fmpz_factor/set_length.c', - 'fmpz/fac_ui.c', - 'fmpz/fdiv.c', - 'fmpz/fib_ui.c', - 'fmpz/fits_si.c', - 'fmpz/flog.c', - 'fmpz/fmma.c', - 'fmpz/fmms.c', - 'fmpz/gcd.c', - 'fmpz/gcdinv.c', - 'fmpz/get.c', - 'fmpz/get_str.c', - 'fmpzi/bits.c', - 'fmpzi/canonical_unit_i_pow.c', - 'fmpzi/divexact.c', - 'fmpzi/div_i.c', - 'fmpzi/divrem_approx.c', - 'fmpzi/divrem.c', - 'fmpzi/gcd_binary.c', - 'fmpzi/gcd.c', - 'fmpzi/gcd_euclidean.c', - 'fmpzi/gcd_euclidean_improved.c', - 'fmpzi/gcd_shortest.c', - 'fmpzi/inlines.c', - 'fmpzi/io.c', - 'fmpzi/is_prime.c', - 'fmpzi/is_probabprime.c', - 'fmpzi/mul.c', - 'fmpzi/mul_i.c', - 'fmpzi/mul_i_pow_si.c', - 'fmpz/init2.c', - 'fmpz/init_set_readonly.c', - 'fmpz/inlines.c', - 'fmpz/invmod.c', - 'fmpz/io.c', - 'fmpzi/pow_ui.c', - 'fmpzi/remove_one_plus_i.c', - 'fmpz/is_canonical.c', - 'fmpz/is_perfect_power.c', - 'fmpz/is_prime.c', - 'fmpz/is_prime_morrison.c', - 'fmpz/is_prime_pocklington.c', - 'fmpz/is_prime_pseudosquare.c', - 'fmpz/is_probabprime_BPSW.c', - 'fmpz/is_probabprime_lucas.c', - 'fmpzi/sqr.c', - 'fmpz/is_square.c', - 'fmpz/is_strong_probabprime.c', - 'fmpz/jacobi.c', - 'fmpz/kronecker.c', - 'fmpz/lcm.c', - 'fmpz_lll/advance_check_babai.c', - 'fmpz_lll/advance_check_babai_heuristic_d.c', - 'fmpz_lll/babai.c', - 'fmpz_lll/check_babai.c', - 'fmpz_lll/check_babai_heuristic.c', - 'fmpz_lll/check_babai_heuristic_d.c', - 'fmpz_lll/context_init.c', - 'fmpz_lll/context_init_default.c', - 'fmpz_lll/d_lll.c', - 'fmpz_lll/heuristic_dot.c', - 'fmpz_lll/is_reduced.c', - 'fmpz_lll/is_reduced_d.c', - 'fmpz_lll/is_reduced_d_with_removal.c', - 'fmpz_lll/is_reduced_mpfr.c', - 'fmpz_lll/is_reduced_mpfr_with_removal.c', - 'fmpz_lll/is_reduced_with_removal.c', - 'fmpz_lll/lll.c', - 'fmpz_lll/lll_d.c', - 'fmpz_lll/lll_d_heuristic.c', - 'fmpz_lll/lll_d_heuristic_with_removal.c', - 'fmpz_lll/lll_d_with_removal.c', - 'fmpz_lll/lll_d_with_removal_knapsack.c', - 'fmpz_lll/lll_mpf2.c', - 'fmpz_lll/lll_mpf2_with_removal.c', - 'fmpz_lll/lll_mpf.c', - 'fmpz_lll/lll_mpf_with_removal.c', - 'fmpz_lll/lll_with_removal.c', - 'fmpz_lll/lll_with_removal_ulll.c', - 'fmpz_lll/mpf2_lll.c', - 'fmpz_lll/mpf-impl.c', - 'fmpz_lll/randtest.c', - 'fmpz_lll/shift.c', - 'fmpz_lll/storjohann_ulll.c', - 'fmpz_lll/wrapper.c', - 'fmpz_lll/wrapper_with_removal.c', - 'fmpz_lll/wrapper_with_removal_knapsack.c', - 'fmpz/logic.c', - 'fmpz/lucas_chain.c', - 'fmpz_mat/add.c', - 'fmpz_mat/can_solve.c', - 'fmpz_mat/can_solve_fflu.c', - 'fmpz_mat/can_solve_multi_mod_den.c', - 'fmpz_mat/charpoly.c', - 'fmpz_mat/chol_d.c', - 'fmpz_mat/clear.c', - 'fmpz_mat/col_partition.c', - 'fmpz_mat/concat.c', - 'fmpz_mat/content.c', - 'fmpz_mat/CRT_ui.c', - 'fmpz_mat/det_bareiss.c', - 'fmpz_mat/det_bound.c', - 'fmpz_mat/det.c', - 'fmpz_mat/det_cofactor.c', - 'fmpz_mat/det_divisor.c', - 'fmpz_mat/det_modular_accelerated.c', - 'fmpz_mat/det_modular.c', - 'fmpz_mat/det_modular_given_divisor.c', - 'fmpz_mat/equal.c', - 'fmpz_mat/fflu.c', - 'fmpz_mat/find_pivot_any.c', - 'fmpz_mat/find_pivot_smallest.c', - 'fmpz_mat/fmpz_vec_mul.c', - 'fmpz_mat/get.c', - 'fmpz_mat/gram.c', - 'fmpz_mat/hadamard.c', - 'fmpz_mat/hnf.c', - 'fmpz_mat/hnf_classical.c', - 'fmpz_mat/hnf_minors.c', - 'fmpz_mat/hnf_minors_transform.c', - 'fmpz_mat/hnf_modular.c', - 'fmpz_mat/hnf_modular_eldiv.c', - 'fmpz_mat/hnf_pernet_stein.c', - 'fmpz_mat/hnf_transform.c', - 'fmpz_mat/hnf_xgcd.c', - 'fmpz_mat/howell_form_mod.c', - 'fmpz_mat/init.c', - 'fmpz_mat/inlines.c', - 'fmpz_mat/inv.c', - 'fmpz_mat/invert.c', - 'fmpz_mat/io.c', - 'fmpz_mat/is_hadamard.c', - 'fmpz_mat/is_in_hnf.c', - 'fmpz_mat/is_in_rref_with_rank.c', - 'fmpz_mat/is_in_snf.c', - 'fmpz_mat/is_one.c', - 'fmpz_mat/is_reduced.c', - 'fmpz_mat/is_reduced_gram.c', - 'fmpz_mat/is_reduced_gram_with_removal.c', - 'fmpz_mat/is_reduced_with_removal.c', - 'fmpz_mat/is_spd.c', - 'fmpz_mat/is_zero.c', - 'fmpz_mat/kronecker_product.c', - 'fmpz_mat/lll_original.c', - 'fmpz_mat/lll_storjohann.c', - 'fmpz_mat/max_bits.c', - 'fmpz_mat/minpoly_modular.c', - 'fmpz_mat/mul_blas.c', - 'fmpz_mat/mul.c', - 'fmpz_mat/mul_classical.c', - 'fmpz_mat/mul_double_word.c', - 'fmpz_mat/mul_fft.c', - 'fmpz_mat/mul_fmpz_vec.c', - 'fmpz_mat/mul_multi_mod.c', - 'fmpz_mat/mul_small.c', - 'fmpz_mat/mul_strassen.c', - 'fmpz_mat/multi_CRT_ui.c', - 'fmpz_mat/multi_mod_ui.c', - 'fmpz_mat/mul_waksman.c', - 'fmpz_mat/neg.c', - 'fmpz_mat/next_col_van_hoeij.c', - 'fmpz_mat/nullspace.c', - 'fmpz_mat/one.c', - 'fmpz_mat/pow.c', - 'fmpz_mat/randajtai.c', - 'fmpz_mat/randbits.c', - 'fmpz_mat/randdet.c', - 'fmpz_mat/randintrel.c', - 'fmpz_mat/randntrulike2.c', - 'fmpz_mat/randntrulike.c', - 'fmpz_mat/randops.c', - 'fmpz_mat/randpermdiag.c', - 'fmpz_mat/randrank.c', - 'fmpz_mat/randsimdioph.c', - 'fmpz_mat/randtest.c', - 'fmpz_mat/randtest_unsigned.c', - 'fmpz_mat/rank.c', - 'fmpz_mat/rank_small_inplace.c', - 'fmpz_mat/rref.c', - 'fmpz_mat/rref_fflu.c', - 'fmpz_mat/rref_mul.c', - 'fmpz_mat/scalar.c', - 'fmpz_mat/set.c', - 'fmpz_mat/similarity.c', - 'fmpz_mat/snf.c', - 'fmpz_mat/snf_diagonal.c', - 'fmpz_mat/snf_iliopoulos.c', - 'fmpz_mat/snf_kannan_bachem.c', - 'fmpz_mat/solve_bound.c', - 'fmpz_mat/solve.c', - 'fmpz_mat/solve_cramer.c', - 'fmpz_mat/solve_dixon.c', - 'fmpz_mat/solve_dixon_den.c', - 'fmpz_mat/solve_fflu.c', - 'fmpz_mat/solve_fflu_precomp.c', - 'fmpz_mat/solve_multi_mod_den.c', - 'fmpz_mat/sqr_bodrato.c', - 'fmpz_mat/sqr.c', - 'fmpz_mat/strong_echelon_form_mod.c', - 'fmpz_mat/sub.c', - 'fmpz_mat/swap.c', - 'fmpz_mat/trace.c', - 'fmpz_mat/transpose.c', - 'fmpz_mat/window.c', - 'fmpz_mat/zero.c', - 'fmpz_mod/add.c', - 'fmpz_mod/addmul.c', - 'fmpz/mod.c', - 'fmpz_mod/ctx.c', - 'fmpz_mod/discrete_log_pohlig_hellman.c', - 'fmpz_mod/divides.c', - 'fmpz_mod/equal_fmpz.c', - 'fmpz_mod/inlines.c', - 'fmpz_mod/inv.c', - 'fmpz_mod/is_canonical.c', - 'fmpz_mod/is_invertible.c', - 'fmpz_mod/is_one.c', - 'fmpz_mod_mat/add.c', - 'fmpz_mod_mat/can_solve.c', - 'fmpz_mod_mat/charpoly_berkowitz.c', - 'fmpz_mod_mat/clear.c', - 'fmpz_mod_mat/comparison.c', - 'fmpz_mod_mat/det.c', - 'fmpz_mod_mat/fmpz_vec_mul.c', - 'fmpz_mod_mat/fmpz_vec_mul_ptr.c', - 'fmpz_mod_mat/howell_form.c', - 'fmpz_mod_mat/init.c', - 'fmpz_mod_mat/init_set.c', - 'fmpz_mod_mat/inlines.c', - 'fmpz_mod_mat/inv.c', - 'fmpz_mod_mat/io.c', - 'fmpz_mod_mat/lu.c', - 'fmpz_mod_mat/minpoly.c', - 'fmpz_mod_mat/mul.c', - 'fmpz_mod_mat/mul_classical_threaded.c', - 'fmpz_mod_mat/mul_fmpz_vec.c', - 'fmpz_mod_mat/mul_fmpz_vec_ptr.c', - 'fmpz_mod_mat/neg.c', - 'fmpz_mod_mat/nullspace.c', - 'fmpz_mod_mat/randrank.c', - 'fmpz_mod_mat/randtest.c', - 'fmpz_mod_mat/randtril.c', - 'fmpz_mod_mat/randtriu.c', - 'fmpz_mod_mat/rank.c', - 'fmpz_mod_mat/reduce_row.c', - 'fmpz_mod_mat/rref.c', - 'fmpz_mod_mat/scalar_mul_fmpz.c', - 'fmpz_mod_mat/scalar_mul_si.c', - 'fmpz_mod_mat/scalar_mul_ui.c', - 'fmpz_mod_mat/set_fmpz_mat.c', - 'fmpz_mod_mat/set_get.c', - 'fmpz_mod_mat/similarity.c', - 'fmpz_mod_mat/solve.c', - 'fmpz_mod_mat/solve_tril.c', - 'fmpz_mod_mat/solve_triu.c', - 'fmpz_mod_mat/sqr.c', - 'fmpz_mod_mat/strong_echelon_form.c', - 'fmpz_mod_mat/sub.c', - 'fmpz_mod_mat/submul.c', - 'fmpz_mod_mat/swap.c', - 'fmpz_mod_mat/trace.c', - 'fmpz_mod_mat/window_clear.c', - 'fmpz_mod_mat/window_init.c', - 'fmpz_mod_mpoly/add.c', - 'fmpz_mod_mpoly/add_fmpz.c', - 'fmpz_mod_mpoly/clear.c', - 'fmpz_mod_mpoly/cmp.c', - 'fmpz_mod_mpoly/combine_like_terms.c', - 'fmpz_mod_mpoly/compose_fmpz_mod_mpoly.c', - 'fmpz_mod_mpoly/compose_fmpz_mod_mpoly_geobucket.c', - 'fmpz_mod_mpoly/compose_mat.c', - 'fmpz_mod_mpoly/content_vars.c', - 'fmpz_mod_mpoly/ctx_clear.c', - 'fmpz_mod_mpoly/ctx_init.c', - 'fmpz_mod_mpoly/ctx_init_rand.c', - 'fmpz_mod_mpoly/deflate.c', - 'fmpz_mod_mpoly/deflation.c', - 'fmpz_mod_mpoly/degrees.c', - 'fmpz_mod_mpoly/derivative.c', - 'fmpz_mod_mpoly/discriminant.c', - 'fmpz_mod_mpoly/div.c', - 'fmpz_mod_mpoly/divides.c', - 'fmpz_mod_mpoly/divides_dense.c', - 'fmpz_mod_mpoly/divides_monagan_pearce.c', - 'fmpz_mod_mpoly/div_monagan_pearce.c', - 'fmpz_mod_mpoly/divrem.c', - 'fmpz_mod_mpoly/divrem_ideal.c', - 'fmpz_mod_mpoly/divrem_ideal_monagan_pearce.c', - 'fmpz_mod_mpoly/divrem_monagan_pearce.c', - 'fmpz_mod_mpoly/equal.c', - 'fmpz_mod_mpoly/equal_fmpz.c', - 'fmpz_mod_mpoly/evaluate_all_fmpz.c', - 'fmpz_mod_mpoly/evaluate_one.c', - 'fmpz_mod_mpoly_factor/bpoly_factor_smprime.c', - 'fmpz_mod_mpoly_factor/bpoly_hlift.c', - 'fmpz_mod_mpoly_factor/clear.c', - 'fmpz_mod_mpoly_factor/cmp.c', - 'fmpz_mod_mpoly_factor/compression.c', - 'fmpz_mod_mpoly_factor/eval.c', - 'fmpz_mod_mpoly_factor/expand.c', - 'fmpz_mod_mpoly_factor/factor.c', - 'fmpz_mod_mpoly_factor/factor_content.c', - 'fmpz_mod_mpoly_factor/factor_squarefree.c', - 'fmpz_mod_mpoly_factor/fit_length.c', - 'fmpz_mod_mpoly_factor/fmpz_mod_bpoly.c', - 'fmpz_mod_mpoly_factor/fmpz_mod_mat_extras.c', - 'fmpz_mod_mpoly_factor/fmpz_mod_poly_extras.c', - 'fmpz_mod_mpoly_factor/fmpz_mod_poly_vec.c', - 'fmpz_mod_mpoly_factor/fmpz_mod_pow_cache.c', - 'fmpz_mod_mpoly_factor/gcd_algo.c', - 'fmpz_mod_mpoly_factor/gcd_brown.c', - 'fmpz_mod_mpoly_factor/gcd_hensel.c', - 'fmpz_mod_mpoly_factor/gcd_zippel2.c', - 'fmpz_mod_mpoly_factor/gcd_zippel.c', - 'fmpz_mod_mpoly_factor/get_set_lead0.c', - 'fmpz_mod_mpoly_factor/inlines.c', - 'fmpz_mod_mpoly_factor/interp.c', - 'fmpz_mod_mpoly_factor/io.c', - 'fmpz_mod_mpoly_factor/irred_smprime_wang.c', - 'fmpz_mod_mpoly_factor/irred_smprime_zassenhaus.c', - 'fmpz_mod_mpoly_factor/irred_smprime_zippel.c', - 'fmpz_mod_mpoly_factor/lcc_wang.c', - 'fmpz_mod_mpoly_factor/mpoly_hlift.c', - 'fmpz_mod_mpoly_factor/mpoly_hlift_zippel.c', - 'fmpz_mod_mpoly_factor/mpolyn.c', - 'fmpz_mod_mpoly_factor/mpolyn_divides.c', - 'fmpz_mod_mpoly_factor/mpoly_pfrac.c', - 'fmpz_mod_mpoly_factor/mpolyu.c', - 'fmpz_mod_mpoly_factor/mpolyv.c', - 'fmpz_mod_mpoly_factor/polyu3_mod_hlift.c', - 'fmpz_mod_mpoly_factor/polyun.c', - 'fmpz_mod_mpoly_factor/realloc.c', - 'fmpz_mod_mpoly_factor/set_nmod_mpoly_factor.c', - 'fmpz_mod_mpoly_factor/sort.c', - 'fmpz_mod_mpoly_factor/stack.c', - 'fmpz_mod_mpoly_factor/zip_helpers.c', - 'fmpz_mod_mpoly/fit_length.c', - 'fmpz_mod_mpoly/fit_length_fit_bits.c', - 'fmpz_mod_mpoly/fit_length_reset_bits.c', - 'fmpz_mod_mpoly/gcd_brown.c', - 'fmpz_mod_mpoly/gcd.c', - 'fmpz_mod_mpoly/gcd_cofactors.c', - 'fmpz_mod_mpoly/gcd_hensel.c', - 'fmpz_mod_mpoly/gcd_subresultant.c', - 'fmpz_mod_mpoly/gcd_zippel2.c', - 'fmpz_mod_mpoly/gcd_zippel.c', - 'fmpz_mod_mpoly/gen.c', - 'fmpz_mod_mpoly/geobuckets.c', - 'fmpz_mod_mpoly/get_coeff_fmpz_fmpz.c', - 'fmpz_mod_mpoly/get_coeff_fmpz_monomial.c', - 'fmpz_mod_mpoly/get_coeff_fmpz_ui.c', - 'fmpz_mod_mpoly/get_coeff_vars_ui.c', - 'fmpz_mod_mpoly/get_fmpz.c', - 'fmpz_mod_mpoly/get_set_is_fmpz_mod_poly.c', - 'fmpz_mod_mpoly/get_set_nmod_mpoly.c', - 'fmpz_mod_mpoly/get_str_pretty.c', - 'fmpz_mod_mpoly/get_term.c', - 'fmpz_mod_mpoly/get_term_coeff_fmpz.c', - 'fmpz_mod_mpoly/get_term_exp_fmpz.c', - 'fmpz_mod_mpoly/get_term_exp_si.c', - 'fmpz_mod_mpoly/get_term_exp_ui.c', - 'fmpz_mod_mpoly/get_term_monomial.c', - 'fmpz_mod_mpoly/get_term_var_exp_si.c', - 'fmpz_mod_mpoly/get_term_var_exp_ui.c', - 'fmpz_mod_mpoly/inflate.c', - 'fmpz_mod_mpoly/init.c', - 'fmpz_mod_mpoly/inlines.c', - 'fmpz_mod_mpoly/io.c', - 'fmpz_mod_mpoly/is_canonical.c', - 'fmpz_mod_mpoly/is_fmpz.c', - 'fmpz_mod_mpoly/is_gen.c', - 'fmpz_mod_mpoly/lead_coeff_vars.c', - 'fmpz_mod_mpoly/make_monic.c', - 'fmpz_mod_mpoly/mul.c', - 'fmpz_mod_mpoly/mul_dense.c', - 'fmpz_mod_mpoly/mul_johnson.c', - 'fmpz_mod_mpoly/neg.c', - 'fmpz_mod_mpoly/pow_fmpz.c', - 'fmpz_mod_mpoly/pow_rmul.c', - 'fmpz_mod_mpoly/pow_ui.c', - 'fmpz_mod_mpoly/push_term_fmpz_fmpz.c', - 'fmpz_mod_mpoly/push_term_fmpz_ui.c', - 'fmpz_mod_mpoly/quadratic_root.c', - 'fmpz_mod_mpoly/randtest_bits.c', - 'fmpz_mod_mpoly/randtest_bound.c', - 'fmpz_mod_mpoly/randtest_bounds.c', - 'fmpz_mod_mpoly/repack_bits.c', - 'fmpz_mod_mpoly/resize.c', - 'fmpz_mod_mpoly/resultant.c', - 'fmpz_mod_mpoly/scalar_addmul_fmpz.c', - 'fmpz_mod_mpoly/scalar_mul_fmpz.c', - 'fmpz_mod_mpoly/set.c', - 'fmpz_mod_mpoly/set_coeff_fmpz_fmpz.c', - 'fmpz_mod_mpoly/set_coeff_fmpz_monomial.c', - 'fmpz_mod_mpoly/set_coeff_fmpz_ui.c', - 'fmpz_mod_mpoly/set_fmpz.c', - 'fmpz_mod_mpoly/set_str_pretty.c', - 'fmpz_mod_mpoly/set_term_coeff_fmpz.c', - 'fmpz_mod_mpoly/set_term_exp_fmpz.c', - 'fmpz_mod_mpoly/set_term_exp_ui.c', - 'fmpz_mod_mpoly/sort_terms.c', - 'fmpz_mod_mpoly/sqrt_heap.c', - 'fmpz_mod_mpoly/sub.c', - 'fmpz_mod_mpoly/sub_fmpz.c', - 'fmpz_mod_mpoly/term_content.c', - 'fmpz_mod_mpoly/term_exp_fits.c', - 'fmpz_mod_mpoly/to_from_nmod_poly.c', - 'fmpz_mod_mpoly/univar.c', - 'fmpz_mod_mpoly/void_ring.c', - 'fmpz_mod/mul.c', - 'fmpz_mod/neg.c', - 'fmpz_mod/next_smooth_prime.c', - 'fmpz_mod_poly/add.c', - 'fmpz_mod_poly/add_series.c', - 'fmpz_mod_poly/attributes.c', - 'fmpz_mod_poly/berlekamp_massey.c', - 'fmpz_mod_poly/clear.c', - 'fmpz_mod_poly/comparison.c', - 'fmpz_mod_poly/compose.c', - 'fmpz_mod_poly/compose_mod_brent_kung.c', - 'fmpz_mod_poly/compose_mod_brent_kung_precomp_preinv.c', - 'fmpz_mod_poly/compose_mod_brent_kung_preinv.c', - 'fmpz_mod_poly/compose_mod_brent_kung_vec_preinv.c', - 'fmpz_mod_poly/compose_mod_brent_kung_vec_preinv_threaded.c', - 'fmpz_mod_poly/compose_mod.c', - 'fmpz_mod_poly/compose_mod_horner.c', - 'fmpz_mod_poly/deflate.c', - 'fmpz_mod_poly/deflation.c', - 'fmpz_mod_poly/derivative.c', - 'fmpz_mod_poly/discriminant.c', - 'fmpz_mod_poly/div.c', - 'fmpz_mod_poly/divides.c', - 'fmpz_mod_poly/divides_classical.c', - 'fmpz_mod_poly/div_newton_n_preinv.c', - 'fmpz_mod_poly/divrem_basecase.c', - 'fmpz_mod_poly/divrem.c', - 'fmpz_mod_poly/divrem_f.c', - 'fmpz_mod_poly/divrem_newton_n_preinv.c', - 'fmpz_mod_poly/div_series.c', - 'fmpz_mod_poly/evaluate_fmpz.c', - 'fmpz_mod_poly/evaluate_fmpz_vec.c', - 'fmpz_mod_poly_factor/clear.c', - 'fmpz_mod_poly_factor/concat.c', - 'fmpz_mod_poly_factor/factor_berlekamp.c', - 'fmpz_mod_poly_factor/factor.c', - 'fmpz_mod_poly_factor/factor_cantor_zassenhaus.c', - 'fmpz_mod_poly_factor/factor_distinct_deg.c', - 'fmpz_mod_poly_factor/factor_distinct_deg_threaded.c', - 'fmpz_mod_poly_factor/factor_equal_deg.c', - 'fmpz_mod_poly_factor/factor_equal_deg_prob.c', - 'fmpz_mod_poly_factor/factor_kaltofen_shoup.c', - 'fmpz_mod_poly_factor/factor_squarefree.c', - 'fmpz_mod_poly_factor/fit_length.c', - 'fmpz_mod_poly_factor/get_poly.c', - 'fmpz_mod_poly_factor/init.c', - 'fmpz_mod_poly_factor/inlines.c', - 'fmpz_mod_poly_factor/insert.c', - 'fmpz_mod_poly_factor/is_irreducible.c', - 'fmpz_mod_poly_factor/is_irreducible_ddf.c', - 'fmpz_mod_poly_factor/is_irreducible_rabin.c', - 'fmpz_mod_poly_factor/is_irreducible_rabin_f.c', - 'fmpz_mod_poly_factor/is_squarefree.c', - 'fmpz_mod_poly_factor/is_squarefree_f.c', - 'fmpz_mod_poly_factor/pow.c', - 'fmpz_mod_poly_factor/print.c', - 'fmpz_mod_poly_factor/print_pretty.c', - 'fmpz_mod_poly_factor/realloc.c', - 'fmpz_mod_poly_factor/roots.c', - 'fmpz_mod_poly_factor/roots_factored.c', - 'fmpz_mod_poly_factor/set.c', - 'fmpz_mod_poly/find_distinct_nonzero_roots.c', - 'fmpz_mod_poly/fit_length.c', - 'fmpz_mod_poly/frobenius_power.c', - 'fmpz_mod_poly/frobenius_powers_2exp_clear.c', - 'fmpz_mod_poly/frobenius_powers_2exp_precomp.c', - 'fmpz_mod_poly/frobenius_powers_clear.c', - 'fmpz_mod_poly/frobenius_powers_precomp.c', - 'fmpz_mod_poly/gcd.c', - 'fmpz_mod_poly/gcd_euclidean_f.c', - 'fmpz_mod_poly/gcdinv.c', - 'fmpz_mod_poly/gcdinv_euclidean.c', - 'fmpz_mod_poly/gcdinv_euclidean_f.c', - 'fmpz_mod_poly/gcdinv_f.c', - 'fmpz_mod_poly/gen.c', - 'fmpz_mod_poly/get.c', - 'fmpz_mod_poly/get_str.c', - 'fmpz_mod_poly/hamming_weight.c', - 'fmpz_mod_poly/hgcd.c', - 'fmpz_mod_poly/inflate.c', - 'fmpz_mod_poly/init.c', - 'fmpz_mod_poly/inlines.c', - 'fmpz_mod_poly/invmod.c', - 'fmpz_mod_poly/invmod_f.c', - 'fmpz_mod_poly/inv_series.c', - 'fmpz_mod_poly/inv_series_newton_f.c', - 'fmpz_mod_poly/invsqrt_series.c', - 'fmpz_mod_poly/io.c', - 'fmpz_mod_poly/is_canonical.c', - 'fmpz_mod_poly/make_monic.c', - 'fmpz_mod_poly/make_monic_f.c', - 'fmpz_mod_poly/minpoly.c', - 'fmpz_mod_poly/mul.c', - 'fmpz_mod_poly/mulhigh.c', - 'fmpz_mod_poly/mullow.c', - 'fmpz_mod_poly/mulmod.c', - 'fmpz_mod_poly/mulmod_preinv.c', - 'fmpz_mod_poly/neg.c', - 'fmpz_mod_poly/one.c', - 'fmpz_mod_poly/pow.c', - 'fmpz_mod_poly/powers_mod_bsgs_threaded.c', - 'fmpz_mod_poly/powers_mod_naive.c', - 'fmpz_mod_poly/powmod_fmpz_binexp.c', - 'fmpz_mod_poly/powmod_fmpz_binexp_preinv.c', - 'fmpz_mod_poly/powmod_linear_fmpz_preinv.c', - 'fmpz_mod_poly/powmod_ui_binexp.c', - 'fmpz_mod_poly/powmod_ui_binexp_preinv.c', - 'fmpz_mod_poly/powmod_x_fmpz_preinv.c', - 'fmpz_mod_poly/pow_trunc_binexp.c', - 'fmpz_mod_poly/pow_trunc.c', - 'fmpz_mod_poly/product_roots_fmpz_vec.c', - 'fmpz_mod_poly/radix.c', - 'fmpz_mod_poly/randtest.c', - 'fmpz_mod_poly/randtest_monic_primitive.c', - 'fmpz_mod_poly/realloc.c', - 'fmpz_mod_poly/rem_basecase.c', - 'fmpz_mod_poly/rem.c', - 'fmpz_mod_poly/remove.c', - 'fmpz_mod_poly/resultant.c', - 'fmpz_mod_poly/reverse.c', - 'fmpz_mod_poly/scalar.c', - 'fmpz_mod_poly/set.c', - 'fmpz_mod_poly/set_get_coeff.c', - 'fmpz_mod_poly/set_length.c', - 'fmpz_mod_poly/set_trunc.c', - 'fmpz_mod_poly/shift_left.c', - 'fmpz_mod_poly/shift_right.c', - 'fmpz_mod_poly/sqr.c', - 'fmpz_mod_poly/sqrt.c', - 'fmpz_mod_poly/sqrt_series.c', - 'fmpz_mod_poly/sub.c', - 'fmpz_mod_poly/sub_series.c', - 'fmpz_mod_poly/tree.c', - 'fmpz_mod_poly/truncate.c', - 'fmpz_mod_poly/xgcd.c', - 'fmpz_mod_poly/xgcd_euclidean_f.c', - 'fmpz_mod_poly/zero_coeffs.c', - 'fmpz_mod/pow.c', - 'fmpz_mod/rand.c', - 'fmpz_mod/set_fmpz.c', - 'fmpz_mod/set_modulus.c', - 'fmpz_mod/sub.c', - 'fmpz_mod_vec/add.c', - 'fmpz_mod_vec/dot.c', - 'fmpz_mod_vec/mul.c', - 'fmpz_mod_vec/neg.c', - 'fmpz_mod_vec/scalar.c', - 'fmpz_mod_vec/set_fmpz_vec.c', - 'fmpz_mod_vec/sub.c', - 'fmpz/moebius_mu.c', - 'fmpz_mpoly/add.c', - 'fmpz_mpoly/add_fmpz.c', - 'fmpz_mpoly/buchberger_naive.c', - 'fmpz_mpoly/clear.c', - 'fmpz_mpoly/cmp.c', - 'fmpz_mpoly/combine_like_terms.c', - 'fmpz_mpoly/compose_fmpz_mpoly.c', - 'fmpz_mpoly/compose_fmpz_mpoly_gen.c', - 'fmpz_mpoly/compose_fmpz_mpoly_geobucket.c', - 'fmpz_mpoly/compose_fmpz_mpoly_horner.c', - 'fmpz_mpoly/compose_fmpz_poly.c', - 'fmpz_mpoly/compose_mat.c', - 'fmpz_mpoly/content_vars.c', - 'fmpz_mpoly/ctx.c', - 'fmpz_mpoly/deflate.c', - 'fmpz_mpoly/deflation.c', - 'fmpz_mpoly/degrees.c', - 'fmpz_mpoly/derivative.c', - 'fmpz_mpoly/discriminant.c', - 'fmpz_mpoly/div.c', - 'fmpz_mpoly/divides_array.c', - 'fmpz_mpoly/divides.c', - 'fmpz_mpoly/divides_heap_threaded.c', - 'fmpz_mpoly/divides_monagan_pearce.c', - 'fmpz_mpoly/div_monagan_pearce.c', - 'fmpz_mpoly/divrem_array.c', - 'fmpz_mpoly/divrem.c', - 'fmpz_mpoly/divrem_ideal.c', - 'fmpz_mpoly/equal.c', - 'fmpz_mpoly/equal_fmpz.c', - 'fmpz_mpoly/equal_si.c', - 'fmpz_mpoly/equal_ui.c', - 'fmpz_mpoly/evaluate_all.c', - 'fmpz_mpoly/evaluate_all_fmpz_mod.c', - 'fmpz_mpoly/evaluate_all_nmod.c', - 'fmpz_mpoly/evaluate_one.c', - 'fmpz_mpoly_factor/add.c', - 'fmpz_mpoly_factor/bpoly.c', - 'fmpz_mpoly_factor/bpoly_factor.c', - 'fmpz_mpoly_factor/clear.c', - 'fmpz_mpoly_factor/cmp.c', - 'fmpz_mpoly_factor/compression.c', - 'fmpz_mpoly_factor/eval.c', - 'fmpz_mpoly_factor/expand.c', - 'fmpz_mpoly_factor/factor_bound_si.c', - 'fmpz_mpoly_factor/factor.c', - 'fmpz_mpoly_factor/factor_content.c', - 'fmpz_mpoly_factor/factor_squarefree.c', - 'fmpz_mpoly_factor/fit_length.c', - 'fmpz_mpoly_factor/gcd_algo.c', - 'fmpz_mpoly_factor/gcd_brown.c', - 'fmpz_mpoly_factor/gcd_brown_threaded.c', - 'fmpz_mpoly_factor/gcd_hensel.c', - 'fmpz_mpoly_factor/gcd_zippel2.c', - 'fmpz_mpoly_factor/gcd_zippel.c', - 'fmpz_mpoly_factor/get_set_lead0.c', - 'fmpz_mpoly_factor/init.c', - 'fmpz_mpoly_factor/inlines.c', - 'fmpz_mpoly_factor/interp.c', - 'fmpz_mpoly_factor/irred_wang.c', - 'fmpz_mpoly_factor/irred_zassenhaus.c', - 'fmpz_mpoly_factor/irred_zippel.c', - 'fmpz_mpoly_factor/lcc_kaltofen.c', - 'fmpz_mpoly_factor/lcc_wang.c', - 'fmpz_mpoly_factor/misc.c', - 'fmpz_mpoly_factor/mpoly_hlift.c', - 'fmpz_mpoly_factor/mpolyl.c', - 'fmpz_mpoly_factor/mpoly_pfrac.c', - 'fmpz_mpoly_factor/mpolyv.c', - 'fmpz_mpoly_factor/poly_pfrac.c', - 'fmpz_mpoly_factor/print_pretty.c', - 'fmpz_mpoly_factor/realloc.c', - 'fmpz_mpoly_factor/set.c', - 'fmpz_mpoly_factor/sort.c', - 'fmpz_mpoly_factor/tpoly.c', - 'fmpz_mpoly_factor/tuple.c', - 'fmpz_mpoly/fit_bits.c', - 'fmpz_mpoly/fit_length.c', - 'fmpz_mpoly/fit_length_reset_bits.c', - 'fmpz_mpoly/gcd_brown.c', - 'fmpz_mpoly/gcd.c', - 'fmpz_mpoly/gcd_cofactors.c', - 'fmpz_mpoly/gcd_hensel.c', - 'fmpz_mpoly/gcd_subresultant.c', - 'fmpz_mpoly/gcd_zippel2.c', - 'fmpz_mpoly/gcd_zippel.c', - 'fmpz_mpoly/gen.c', - 'fmpz_mpoly/geobuckets.c', - 'fmpz_mpoly/get_coeff_fmpz_fmpz.c', - 'fmpz_mpoly/get_coeff_fmpz_monomial.c', - 'fmpz_mpoly/get_coeff_fmpz_ui.c', - 'fmpz_mpoly/get_coeff_si_fmpz.c', - 'fmpz_mpoly/get_coeff_si_ui.c', - 'fmpz_mpoly/get_coeff_ui_fmpz.c', - 'fmpz_mpoly/get_coeff_ui_ui.c', - 'fmpz_mpoly/get_coeff_vars_ui.c', - 'fmpz_mpoly/get_fmpz.c', - 'fmpz_mpoly/get_set_is_fmpz_poly.c', - 'fmpz_mpoly/get_str_pretty.c', - 'fmpz_mpoly/get_term.c', - 'fmpz_mpoly/get_term_coeff_fmpz.c', - 'fmpz_mpoly/get_term_exp_fmpz.c', - 'fmpz_mpoly/get_term_exp_si.c', - 'fmpz_mpoly/get_term_exp_ui.c', - 'fmpz_mpoly/get_term_monomial.c', - 'fmpz_mpoly/get_term_var_exp_si.c', - 'fmpz_mpoly/get_term_var_exp_ui.c', - 'fmpz_mpoly/inflate.c', - 'fmpz_mpoly/init.c', - 'fmpz_mpoly/inlines.c', - 'fmpz_mpoly/integral.c', - 'fmpz_mpoly/io.c', - 'fmpz_mpoly/is_canonical.c', - 'fmpz_mpoly/is_fmpz.c', - 'fmpz_mpoly/is_gen.c', - 'fmpz_mpoly/lead_coeff_vars.c', - 'fmpz_mpoly/misc.c', - 'fmpz_mpoly/mpolyd.c', - 'fmpz_mpoly/mul_array.c', - 'fmpz_mpoly/mul_array_threaded.c', - 'fmpz_mpoly/mul.c', - 'fmpz_mpoly/mul_dense.c', - 'fmpz_mpoly/mul_heap_threaded.c', - 'fmpz_mpoly/mul_johnson.c', - 'fmpz_mpoly/mul_monomial.c', - 'fmpz_mpoly/neg.c', - 'fmpz_mpoly/pow_fmpz.c', - 'fmpz_mpoly/pow_fps.c', - 'fmpz_mpoly/pow_ui.c', - 'fmpz_mpoly/primitive_part.c', - 'fmpz_mpoly/push_term_fmpz_fmpz.c', - 'fmpz_mpoly/push_term_fmpz_ui.c', - 'fmpz_mpoly_q/add.c', - 'fmpz_mpoly_q/canonicalise.c', - 'fmpz_mpoly_q/clear.c', - 'fmpz_mpoly_q/div.c', - 'fmpz_mpoly_q/equal.c', - 'fmpz_mpoly_q/evaluate_acb.c', - 'fmpz_mpoly_q/init.c', - 'fmpz_mpoly_q/inlines.c', - 'fmpz_mpoly_q/inv.c', - 'fmpz_mpoly_q/is_canonical.c', - 'fmpz_mpoly_q/mul.c', - 'fmpz_mpoly_q/neg.c', - 'fmpz_mpoly_q/print_pretty.c', - 'fmpz_mpoly_q/randtest.c', - 'fmpz_mpoly_q/set.c', - 'fmpz_mpoly_q/sub.c', - 'fmpz_mpoly_q/swap.c', - 'fmpz_mpoly/quasidiv.c', - 'fmpz_mpoly/quasidiv_heap.c', - 'fmpz_mpoly/quasidivrem.c', - 'fmpz_mpoly/quasidivrem_heap.c', - 'fmpz_mpoly/quasidivrem_ideal.c', - 'fmpz_mpoly/quasidivrem_ideal_heap.c', - 'fmpz_mpoly_q/used_vars.c', - 'fmpz_mpoly/randtest_bits.c', - 'fmpz_mpoly/randtest_bound.c', - 'fmpz_mpoly/randtest_bounds.c', - 'fmpz_mpoly/realloc.c', - 'fmpz_mpoly/reduction_primitive_part.c', - 'fmpz_mpoly/repack_bits.c', - 'fmpz_mpoly/resize.c', - 'fmpz_mpoly/resultant.c', - 'fmpz_mpoly/reverse.c', - 'fmpz_mpoly/scalar_divexact_fmpz.c', - 'fmpz_mpoly/scalar_divides_fmpz.c', - 'fmpz_mpoly/scalar_fmma.c', - 'fmpz_mpoly/scalar_mul_fmpz.c', - 'fmpz_mpoly/select_exps.c', - 'fmpz_mpoly/set.c', - 'fmpz_mpoly/set_coeff_fmpz_fmpz.c', - 'fmpz_mpoly/set_coeff_fmpz_monomial.c', - 'fmpz_mpoly/set_coeff_fmpz_ui.c', - 'fmpz_mpoly/set_coeff_si_fmpz.c', - 'fmpz_mpoly/set_coeff_si_ui.c', - 'fmpz_mpoly/set_coeff_ui_fmpz.c', - 'fmpz_mpoly/set_coeff_ui_ui.c', - 'fmpz_mpoly/set_fmpz.c', - 'fmpz_mpoly/set_si.c', - 'fmpz_mpoly/set_str_pretty.c', - 'fmpz_mpoly/set_term_coeff_fmpz.c', - 'fmpz_mpoly/set_term_exp_fmpz.c', - 'fmpz_mpoly/set_term_exp_ui.c', - 'fmpz_mpoly/set_ui.c', - 'fmpz_mpoly/sort_terms.c', - 'fmpz_mpoly/spoly.c', - 'fmpz_mpoly/sqrt_heap.c', - 'fmpz_mpoly/sub.c', - 'fmpz_mpoly/sub_fmpz.c', - 'fmpz_mpoly/symmetric.c', - 'fmpz_mpoly/term_content.c', - 'fmpz_mpoly/term_exp_fits.c', - 'fmpz_mpoly/to_from_fmpz_poly.c', - 'fmpz_mpoly/univar.c', - 'fmpz_mpoly/vec_autoreduction.c', - 'fmpz_mpoly/vec_autoreduction_groebner.c', - 'fmpz_mpoly/vec.c', - 'fmpz_mpoly/vec_is_autoreduced.c', - 'fmpz_mpoly/vec_is_groebner.c', - 'fmpz_mpoly/vec_set_length.c', - 'fmpz_mpoly/vec_set_primitive_unique.c', - 'fmpz_mpoly/void_ring.c', - 'fmpz/mpz_readonly.c', - 'fmpz/mul_2exp.c', - 'fmpz/mul.c', - 'fmpz/mul_si_tdiv_q_2exp.c', - 'fmpz/mul_tdiv_q_2exp.c', - 'fmpz/multi_CRT.c', - 'fmpz/multi_mod.c', - 'fmpz/ndiv_qr.c', - 'fmpz/neg.c', - 'fmpz/nextprime.c', - 'fmpz/one_2exp.c', - 'fmpz_poly/2norm.c', - 'fmpz_poly/2norm_normalised_bits.c', - 'fmpz_poly/add.c', - 'fmpz_poly/add_series.c', - 'fmpz_poly/bit_pack.c', - 'fmpz_poly/bit_unpack.c', - 'fmpz_poly/bound_roots.c', - 'fmpz_poly/chebyshev_t.c', - 'fmpz_poly/chebyshev_u.c', - 'fmpz_poly/CLD_bound.c', - 'fmpz_poly/clear.c', - 'fmpz_poly/compose.c', - 'fmpz_poly/compose_divconquer.c', - 'fmpz_poly/compose_horner.c', - 'fmpz_poly/compose_series.c', - 'fmpz_poly/content.c', - 'fmpz_poly/cos_minpoly.c', - 'fmpz_poly/CRT_ui.c', - 'fmpz_poly/cyclotomic.c', - 'fmpz_poly/deflate.c', - 'fmpz_poly/deflation.c', - 'fmpz_poly/derivative.c', - 'fmpz_poly/discriminant.c', - 'fmpz_poly/div_basecase.c', - 'fmpz_poly/div.c', - 'fmpz_poly/div_divconquer.c', - 'fmpz_poly/div_divconquer_recursive.c', - 'fmpz_poly/divexact.c', - 'fmpz_poly/divhigh_smodp.c', - 'fmpz_poly/divides.c', - 'fmpz_poly/divlow_smodp.c', - 'fmpz_poly/div_preinv.c', - 'fmpz_poly/divrem_basecase.c', - 'fmpz_poly/divrem.c', - 'fmpz_poly/divrem_divconquer.c', - 'fmpz_poly/divrem_divconquer_recursive.c', - 'fmpz_poly/divremlow_divconquer_recursive.c', - 'fmpz_poly/divrem_preinv.c', - 'fmpz_poly/div_root.c', - 'fmpz_poly/div_series_basecase.c', - 'fmpz_poly/div_series.c', - 'fmpz_poly/div_series_divconquer.c', - 'fmpz_poly/equal.c', - 'fmpz_poly/equal_trunc.c', - 'fmpz_poly/eta_qexp.c', - 'fmpz_poly/eulerian_polynomial.c', - 'fmpz_poly/evaluate_divconquer_fmpq.c', - 'fmpz_poly/evaluate_divconquer_fmpz.c', - 'fmpz_poly/evaluate_fmpq.c', - 'fmpz_poly/evaluate_fmpz.c', - 'fmpz_poly/evaluate_fmpz_vec.c', - 'fmpz_poly/evaluate_horner_d_2exp.c', - 'fmpz_poly/evaluate_horner_d.c', - 'fmpz_poly/evaluate_horner_fmpq.c', - 'fmpz_poly/evaluate_horner_fmpz.c', - 'fmpz_poly/evaluate_mod.c', - 'fmpz_poly_factor/CLD_mat.c', - 'fmpz_poly_factor/clear.c', - 'fmpz_poly_factor/concat.c', - 'fmpz_poly_factor/factor.c', - 'fmpz_poly_factor/factor_cubic.c', - 'fmpz_poly_factor/factor_quadratic.c', - 'fmpz_poly_factor/factor_squarefree.c', - 'fmpz_poly_factor/factor_van_hoeij.c', - 'fmpz_poly_factor/factor_zassenhaus.c', - 'fmpz_poly_factor/factor_zassenhaus_recombination.c', - 'fmpz_poly_factor/fit_length.c', - 'fmpz_poly_factor/init.c', - 'fmpz_poly_factor/inlines.c', - 'fmpz_poly_factor/insert.c', - 'fmpz_poly_factor/print.c', - 'fmpz_poly_factor/realloc.c', - 'fmpz_poly_factor/set.c', - 'fmpz_poly_factor/van_hoeij_check_if_solved.c', - 'fmpz_poly_factor/zassenhaus_prune.c', - 'fmpz_poly_factor/zassenhaus_subset.c', - 'fmpz_poly/fibonacci.c', - 'fmpz_poly/fit_length.c', - 'fmpz_poly/gcd.c', - 'fmpz_poly/gcd_heuristic.c', - 'fmpz_poly/gcd_modular.c', - 'fmpz_poly/gcd_subresultant.c', - 'fmpz_poly/get_coeff.c', - 'fmpz_poly/get_nmod_poly.c', - 'fmpz_poly/get_str.c', - 'fmpz_poly/hensel_build_tree.c', - 'fmpz_poly/hensel_continue_lift.c', - 'fmpz_poly/hensel_lift.c', - 'fmpz_poly/hensel_lift_once.c', - 'fmpz_poly/hensel_lift_only_inverse.c', - 'fmpz_poly/hensel_lift_tree.c', - 'fmpz_poly/hensel_lift_tree_recursive.c', - 'fmpz_poly/hensel_lift_without_inverse.c', - 'fmpz_poly/hensel_start_lift.c', - 'fmpz_poly/hermite_h.c', - 'fmpz_poly/hermite_he.c', - 'fmpz_poly/inflate.c', - 'fmpz_poly/init.c', - 'fmpz_poly/inlines.c', - 'fmpz_poly/interpolate_fmpz_vec.c', - 'fmpz_poly/inv_series.c', - 'fmpz_poly/io.c', - 'fmpz_poly/is_cyclotomic.c', - 'fmpz_poly/is_one.c', - 'fmpz_poly/is_squarefree.c', - 'fmpz_poly/lcm.c', - 'fmpz_poly/legendre_pt.c', - 'fmpz_poly_mat/add.c', - 'fmpz_poly_mat/clear.c', - 'fmpz_poly_mat/concat.c', - 'fmpz_poly_mat/det.c', - 'fmpz_poly_mat/det_fflu.c', - 'fmpz_poly_mat/det_interpolate.c', - 'fmpz_poly_mat/equal.c', - 'fmpz_poly_mat/evaluate_fmpz.c', - 'fmpz_poly_mat/fflu.c', - 'fmpz_poly_mat/find_pivot_any.c', - 'fmpz_poly_mat/find_pivot_partial.c', - 'fmpz_poly_mat/init.c', - 'fmpz_poly_mat/inlines.c', - 'fmpz_poly_mat/inv.c', - 'fmpz_poly_mat/is_one.c', - 'fmpz_poly_mat/is_zero.c', - 'fmpz_poly_mat/max_bits.c', - 'fmpz_poly_mat/max_length.c', - 'fmpz_poly_mat/mul.c', - 'fmpz_poly_mat/mul_classical.c', - 'fmpz_poly_mat/mul_KS.c', - 'fmpz_poly_mat/mullow.c', - 'fmpz_poly_mat/neg.c', - 'fmpz_poly_mat/nullspace.c', - 'fmpz_poly_mat/one.c', - 'fmpz_poly_mat/pow.c', - 'fmpz_poly_mat/pow_trunc.c', - 'fmpz_poly_mat/print.c', - 'fmpz_poly_mat/prod.c', - 'fmpz_poly_mat/rand.c', - 'fmpz_poly_mat/rank.c', - 'fmpz_poly_mat/rref.c', - 'fmpz_poly_mat/scalar.c', - 'fmpz_poly_mat/set.c', - 'fmpz_poly_mat/solve.c', - 'fmpz_poly_mat/solve_fflu.c', - 'fmpz_poly_mat/solve_fflu_precomp.c', - 'fmpz_poly_mat/sqr.c', - 'fmpz_poly_mat/sqr_classical.c', - 'fmpz_poly_mat/sqr_KS.c', - 'fmpz_poly_mat/sqrlow.c', - 'fmpz_poly_mat/sub.c', - 'fmpz_poly_mat/swap.c', - 'fmpz_poly_mat/trace.c', - 'fmpz_poly_mat/transpose.c', - 'fmpz_poly_mat/truncate.c', - 'fmpz_poly_mat/window.c', - 'fmpz_poly_mat/zero.c', - 'fmpz_poly/monomial_to_newton.c', - 'fmpz_poly/mul.c', - 'fmpz_poly/mul_classical.c', - 'fmpz_poly/mulhigh.c', - 'fmpz_poly/mulhigh_classical.c', - 'fmpz_poly/mulhigh_karatsuba_n.c', - 'fmpz_poly/mulhigh_n.c', - 'fmpz_poly/mul_karatsuba.c', - 'fmpz_poly/mul_KS.c', - 'fmpz_poly/mullow.c', - 'fmpz_poly/mullow_classical.c', - 'fmpz_poly/mullow_karatsuba_n.c', - 'fmpz_poly/mullow_KS.c', - 'fmpz_poly/mullow_SS.c', - 'fmpz_poly/mullow_SS_precache.c', - 'fmpz_poly/mulmid_classical.c', - 'fmpz_poly/mul_SS.c', - 'fmpz_poly/neg.c', - 'fmpz_poly/newton_to_monomial.c', - 'fmpz_poly/normalise.c', - 'fmpz_poly/norms.c', - 'fmpz_poly/nth_derivative.c', - 'fmpz_poly/num_real_roots.c', - 'fmpz_poly/num_real_roots_sturm.c', - 'fmpz_poly/pow_addchains.c', - 'fmpz_poly/pow_binexp.c', - 'fmpz_poly/pow_binomial.c', - 'fmpz_poly/pow.c', - 'fmpz_poly/powers_clear.c', - 'fmpz_poly/powers_precompute.c', - 'fmpz_poly/power_sums.c', - 'fmpz_poly/power_sums_naive.c', - 'fmpz_poly/power_sums_to_poly.c', - 'fmpz_poly/pow_multinomial.c', - 'fmpz_poly/pow_small.c', - 'fmpz_poly/pow_trunc.c', - 'fmpz_poly/preinvert.c', - 'fmpz_poly/primitive_part.c', - 'fmpz_poly/product_roots_fmpq_vec.c', - 'fmpz_poly/product_roots_fmpz_vec.c', - 'fmpz_poly/pseudo_div.c', - 'fmpz_poly/pseudo_divrem_basecase.c', - 'fmpz_poly/pseudo_divrem_cohen.c', - 'fmpz_poly/pseudo_divrem_divconquer.c', - 'fmpz_poly/pseudo_rem.c', - 'fmpz_poly/pseudo_rem_cohen.c', - 'fmpz_poly_q/add.c', - 'fmpz_poly_q/addmul.c', - 'fmpz_poly_q/canonicalise.c', - 'fmpz_poly_q/clear.c', - 'fmpz_poly_q/derivative.c', - 'fmpz_poly_q/div.c', - 'fmpz_poly_q/evaluate_fmpq.c', - 'fmpz_poly_q/get_str.c', - 'fmpz_poly_q/get_str_pretty.c', - 'fmpz_poly_q/init.c', - 'fmpz_poly_q/inlines.c', - 'fmpz_poly_q/inv.c', - 'fmpz_poly_q/is_canonical.c', - 'fmpz_poly_q/mul.c', - 'fmpz_poly_q/pow.c', - 'fmpz_poly_q/print.c', - 'fmpz_poly_q/print_pretty.c', - 'fmpz_poly_q/randtest.c', - 'fmpz_poly_q/scalar.c', - 'fmpz_poly_q/set.c', - 'fmpz_poly_q/set_str.c', - 'fmpz_poly_q/sub.c', - 'fmpz_poly_q/submul.c', - 'fmpz_poly_q/swap.c', - 'fmpz_poly/randtest.c', - 'fmpz_poly/randtest_no_real_root.c', - 'fmpz_poly/realloc.c', - 'fmpz_poly/rem_basecase.c', - 'fmpz_poly/rem.c', - 'fmpz_poly/remove.c', - 'fmpz_poly/remove_content_2exp.c', - 'fmpz_poly/rem_powers_precomp.c', - 'fmpz_poly/resultant.c', - 'fmpz_poly/resultant_euclidean.c', - 'fmpz_poly/resultant_modular.c', - 'fmpz_poly/resultant_modular_div.c', - 'fmpz_poly/reverse.c', - 'fmpz_poly/revert_series.c', - 'fmpz_poly/scalar.c', - 'fmpz_poly/scale_2exp.c', - 'fmpz_poly/set.c', - 'fmpz_poly/set_coeff.c', - 'fmpz_poly/set_length.c', - 'fmpz_poly/set_str.c', - 'fmpz_poly/set_trunc.c', - 'fmpz_poly/shift_left.c', - 'fmpz_poly/shift_right.c', - 'fmpz_poly/signature.c', - 'fmpz_poly/sqr.c', - 'fmpz_poly/sqr_classical.c', - 'fmpz_poly/sqr_karatsuba.c', - 'fmpz_poly/sqr_KS.c', - 'fmpz_poly/sqrlow.c', - 'fmpz_poly/sqrlow_classical.c', - 'fmpz_poly/sqrlow_karatsuba_n.c', - 'fmpz_poly/sqrlow_KS.c', - 'fmpz_poly/sqrt.c', - 'fmpz_poly/sqrt_classical.c', - 'fmpz_poly/sqrt_divconquer.c', - 'fmpz_poly/sqrt_KS.c', - 'fmpz_poly/sqrtrem_classical.c', - 'fmpz_poly/sqrtrem_divconquer.c', - 'fmpz_poly/sqrt_series.c', - 'fmpz_poly/sub.c', - 'fmpz_poly/sub_series.c', - 'fmpz_poly/swap.c', - 'fmpz_poly/swinnerton_dyer.c', - 'fmpz_poly/taylor_shift.c', - 'fmpz_poly/taylor_shift_divconquer.c', - 'fmpz_poly/taylor_shift_horner.c', - 'fmpz_poly/taylor_shift_multi_mod_threaded.c', - 'fmpz_poly/theta_qexp.c', - 'fmpz_poly/truncate.c', - 'fmpz_poly/xgcd_modular.c', - 'fmpz_poly/zero_coeffs.c', - 'fmpz/pow.c', - 'fmpz/powm.c', - 'fmpz/powmod2_fmpz_preinv.c', - 'fmpz/preinvn.c', - 'fmpz/primorial.c', - 'fmpz/rand.c', - 'fmpz/remove.c', - 'fmpz/rfac.c', - 'fmpz/root.c', - 'fmpz/setbit.c', - 'fmpz/set.c', - 'fmpz/set_str.c', - 'fmpz/sgn.c', - 'fmpz/size.c', - 'fmpz/sizeinbase.c', - 'fmpz/smod.c', - 'fmpz/sqrt.c', - 'fmpz/sqrtmod.c', - 'fmpz/sqrtrem.c', - 'fmpz/sub.c', - 'fmpz/submul.c', - 'fmpz/tdiv.c', - 'fmpz/tstbit.c', - 'fmpz/val2.c', - 'fmpz_vec/add.c', - 'fmpz_vec/clear.c', - 'fmpz_vec/content.c', - 'fmpz_vec/content_chained.c', - 'fmpz_vec/dot.c', - 'fmpz_vec/equal.c', - 'fmpz_vec/get_d_vec_2exp.c', - 'fmpz_vec/get_fft.c', - 'fmpz_vec/get_nmod_vec.c', - 'fmpz_vec/height.c', - 'fmpz_vec/height_index.c', - 'fmpz_vec/inlines.c', - 'fmpz_vec/io.c', - 'fmpz_vec/is_zero.c', - 'fmpz_vec/lcm.c', - 'fmpz_vec/max_bits.c', - 'fmpz_vec/max.c', - 'fmpz_vec/max_limbs.c', - 'fmpz_vec/min.c', - 'fmpz_vec/neg.c', - 'fmpz_vec/prod.c', - 'fmpz_vec/randtest.c', - 'fmpz_vec/scalar.c', - 'fmpz_vec/set.c', - 'fmpz_vec/set_fft.c', - 'fmpz_vec/set_nmod_vec.c', - 'fmpz_vec/sort.c', - 'fmpz_vec/sub.c', - 'fmpz_vec/sum.c', - 'fmpz_vec/sum_max_bits.c', - 'fmpz_vec/swap.c', - 'fmpz_vec/zero.c', - 'fmpz/xgcd.c', - 'fmpz/xgcd_partial.c', - 'fq/add.c', - 'fq/assignments.c', - 'fq/bit_pack.c', - 'fq/bit_unpack.c', - 'fq/clear.c', - 'fq/comparisons.c', - 'fq/ctx_clear.c', - 'fq/ctx_init.c', - 'fq/ctx_init_modulus.c', - 'fq/ctx_order.c', - 'fq_default/ctx.c', - 'fq_default/get_set.c', - 'fq_default/inlines.c', - 'fq_default/io.c', - 'fq_default_mat/inlines.c', - 'fq_default_mat/io.c', - 'fq_default_poly_factor/inlines.c', - 'fq_default_poly/inlines.c', - 'fq_default_poly/io.c', - 'fq_default_poly/set_fmpz_poly.c', - 'fq_embed/derivative_inv.c', - 'fq_embed/embed.c', - 'fq_embed/matrices.c', - 'fq_embed/mul_matrix.c', - 'fq_embed/pow_series_inv.c', - 'fq/embed_templates.c', - 'fq_embed_templates/composition_matrix.c', - 'fq_embed_templates/embed.c', - 'fq_embed_templates/matrices.c', - 'fq/frobenius.c', - 'fq/gcdinv.c', - 'fq/gen.c', - 'fq/get_fmpz.c', - 'fq/get_fmpz_mod_poly.c', - 'fq/get_fmpz_poly.c', - 'fq/get_set_fmpz_mod_mat.c', - 'fq/get_str.c', - 'fq/get_str_pretty.c', - 'fq/init.c', - 'fq/inlines.c', - 'fq/inv.c', - 'fq/io.c', - 'fq_mat/inlines.c', - 'fq_mat/mul_ks_cutoff.c', - 'fq_mat/reduce_row.c', - 'fq_mat_templates/add.c', - 'fq/mat_templates.c', - 'fq_mat_templates/can_solve.c', - 'fq_mat_templates/charpoly.c', - 'fq_mat_templates/clear.c', - 'fq_mat_templates/concat_horizontal.c', - 'fq_mat_templates/concat_vertical.c', - 'fq_mat_templates/equal.c', - 'fq_mat_templates/init.c', - 'fq_mat_templates/init_set.c', - 'fq_mat_templates/inv.c', - 'fq_mat_templates/io.c', - 'fq_mat_templates/is_one.c', - 'fq_mat_templates/is_zero.c', - 'fq_mat_templates/lu.c', - 'fq_mat_templates/lu_classical.c', - 'fq_mat_templates/lu_recursive.c', - 'fq_mat_templates/mat_entry_set.c', - 'fq_mat_templates/mat_invert_cols.c', - 'fq_mat_templates/mat_swap_cols.c', - 'fq_mat_templates/mat_swap_entrywise.c', - 'fq_mat_templates/minpoly.c', - 'fq_mat_templates/mul.c', - 'fq_mat_templates/mul_classical.c', - 'fq_mat_templates/mul_KS.c', - 'fq_mat_templates/mul_vec.c', - 'fq_mat_templates/neg.c', - 'fq_mat_templates/nullspace.c', - 'fq_mat_templates/one.c', - 'fq_mat_templates/randops.c', - 'fq_mat_templates/randpermdiag.c', - 'fq_mat_templates/randrank.c', - 'fq_mat_templates/randtest.c', - 'fq_mat_templates/randtril.c', - 'fq_mat_templates/randtriu.c', - 'fq_mat_templates/rank.c', - 'fq_mat_templates/reduce_row.c', - 'fq_mat_templates/rref.c', - 'fq_mat_templates/set.c', - 'fq_mat_templates/set_fmpz_mod_mat.c', - 'fq_mat_templates/set_nmod_mat.c', - 'fq_mat_templates/similarity.c', - 'fq_mat_templates/solve.c', - 'fq_mat_templates/solve_tril.c', - 'fq_mat_templates/solve_tril_classical.c', - 'fq_mat_templates/solve_tril_recursive.c', - 'fq_mat_templates/solve_triu.c', - 'fq_mat_templates/solve_triu_classical.c', - 'fq_mat_templates/solve_triu_recursive.c', - 'fq_mat_templates/sub.c', - 'fq_mat_templates/submul.c', - 'fq_mat_templates/swap.c', - 'fq_mat_templates/vec_mul.c', - 'fq_mat_templates/window_clear.c', - 'fq_mat_templates/window_init.c', - 'fq_mat_templates/zero.c', - 'fq/mul.c', - 'fq/mul_fmpz.c', - 'fq/mul_si.c', - 'fq/mul_ui.c', - 'fq/neg.c', - 'fq_nmod/add.c', - 'fq_nmod/assignments.c', - 'fq_nmod/bit_pack.c', - 'fq_nmod/bit_unpack.c', - 'fq_nmod/comparisons.c', - 'fq_nmod/ctx_clear.c', - 'fq_nmod/ctx_init.c', - 'fq_nmod/ctx_init_modulus.c', - 'fq_nmod/ctx_order.c', - 'fq_nmod_embed/modulus_derivative_inv.c', - 'fq_nmod_embed/modulus_pow_series_inv.c', - 'fq_nmod_embed/mul_matrix.c', - 'fq_nmod/embed_templates.c', - 'fq_nmod/frobenius.c', - 'fq_nmod/gcdinv.c', - 'fq_nmod/get_fmpz.c', - 'fq_nmod/get_nmod_poly.c', - 'fq_nmod/get_set_fmpz_mod_mat.c', - 'fq_nmod/get_str.c', - 'fq_nmod/get_str_pretty.c', - 'fq_nmod/init.c', - 'fq_nmod/inlines.c', - 'fq_nmod/inv.c', - 'fq_nmod/io.c', - 'fq_nmod_mat/inlines.c', - 'fq_nmod_mat/mul_ks_cutoff.c', - 'fq_nmod_mat/reduce_row.c', - 'fq_nmod/mat_templates.c', - 'fq_nmod_mpoly/add.c', - 'fq_nmod_mpoly/add_fq_nmod.c', - 'fq_nmod_mpoly/cmp.c', - 'fq_nmod_mpoly/combine_like_terms.c', - 'fq_nmod_mpoly/compose_fq_nmod_mpoly.c', - 'fq_nmod_mpoly/compose_fq_nmod_mpoly_gen.c', - 'fq_nmod_mpoly/compose_fq_nmod_mpoly_geobucket.c', - 'fq_nmod_mpoly/compose_fq_nmod_mpoly_horner.c', - 'fq_nmod_mpoly/compose_fq_nmod_poly.c', - 'fq_nmod_mpoly/compose_mat.c', - 'fq_nmod_mpoly/content_vars.c', - 'fq_nmod_mpoly/ctx_change_modulus.c', - 'fq_nmod_mpoly/ctx_clear.c', - 'fq_nmod_mpoly/ctx_init.c', - 'fq_nmod_mpoly/ctx_init_rand.c', - 'fq_nmod_mpoly/deflate.c', - 'fq_nmod_mpoly/deflation.c', - 'fq_nmod_mpoly/degrees.c', - 'fq_nmod_mpoly/derivative.c', - 'fq_nmod_mpoly/discriminant.c', - 'fq_nmod_mpoly/div.c', - 'fq_nmod_mpoly/divides.c', - 'fq_nmod_mpoly/divides_monagan_pearce.c', - 'fq_nmod_mpoly/div_monagan_pearce.c', - 'fq_nmod_mpoly/divrem.c', - 'fq_nmod_mpoly/divrem_ideal.c', - 'fq_nmod_mpoly/divrem_ideal_monagan_pearce.c', - 'fq_nmod_mpoly/divrem_monagan_pearce.c', - 'fq_nmod_mpoly/equal.c', - 'fq_nmod_mpoly/equal_fq_nmod.c', - 'fq_nmod_mpoly/evaluate_all.c', - 'fq_nmod_mpoly/evaluate_one.c', - 'fq_nmod_mpoly_factor/append.c', - 'fq_nmod_mpoly_factor/clear.c', - 'fq_nmod_mpoly_factor/cmp.c', - 'fq_nmod_mpoly_factor/compression.c', - 'fq_nmod_mpoly_factor/eval.c', - 'fq_nmod_mpoly_factor/expand.c', - 'fq_nmod_mpoly_factor/factor.c', - 'fq_nmod_mpoly_factor/factor_content.c', - 'fq_nmod_mpoly_factor/factor_squarefree.c', - 'fq_nmod_mpoly_factor/fit_length.c', - 'fq_nmod_mpoly_factor/get_constant_fq_nmod.c', - 'fq_nmod_mpoly_factor/get_exp_si.c', - 'fq_nmod_mpoly_factor/get_set_lead0.c', - 'fq_nmod_mpoly_factor/init.c', - 'fq_nmod_mpoly_factor/inlines.c', - 'fq_nmod_mpoly_factor/io.c', - 'fq_nmod_mpoly_factor/irred_lgprime.c', - 'fq_nmod_mpoly_factor/irred_smprime_wang.c', - 'fq_nmod_mpoly_factor/irred_smprime_zassenhaus.c', - 'fq_nmod_mpoly_factor/irred_smprime_zippel.c', - 'fq_nmod_mpoly_factor/lcc_wang.c', - 'fq_nmod_mpoly_factor/mpoly_hlift.c', - 'fq_nmod_mpoly_factor/mpoly_pfrac.c', - 'fq_nmod_mpoly_factor/mpolyv.c', - 'fq_nmod_mpoly_factor/n_bpoly_fq.c', - 'fq_nmod_mpoly_factor/n_bpoly_fq_factor_lgprime.c', - 'fq_nmod_mpoly_factor/n_bpoly_fq_factor_smprime.c', - 'fq_nmod_mpoly_factor/n_bpoly_hlift.c', - 'fq_nmod_mpoly_factor/one.c', - 'fq_nmod_mpoly_factor/polyu3_hlift.c', - 'fq_nmod_mpoly_factor/polyu.c', - 'fq_nmod_mpoly_factor/polyun.c', - 'fq_nmod_mpoly_factor/realloc.c', - 'fq_nmod_mpoly_factor/set.c', - 'fq_nmod_mpoly_factor/sort.c', - 'fq_nmod_mpoly/fit_length.c', - 'fq_nmod_mpoly/fit_length_fit_bits.c', - 'fq_nmod_mpoly/fit_length_reset_bits.c', - 'fq_nmod_mpoly/fq_nmod_embed.c', - 'fq_nmod_mpoly/gcd_brown.c', - 'fq_nmod_mpoly/gcd.c', - 'fq_nmod_mpoly/gcd_cofactors.c', - 'fq_nmod_mpoly/gcd_hensel.c', - 'fq_nmod_mpoly/gcd_zippel2.c', - 'fq_nmod_mpoly/gcd_zippel.c', - 'fq_nmod_mpoly/gen.c', - 'fq_nmod_mpoly/geobuckets.c', - 'fq_nmod_mpoly/get_coeff_fq_nmod_fmpz.c', - 'fq_nmod_mpoly/get_coeff_fq_nmod_monomial.c', - 'fq_nmod_mpoly/get_coeff_fq_nmod_ui.c', - 'fq_nmod_mpoly/get_coeff_vars_ui.c', - 'fq_nmod_mpoly/get_fq_nmod.c', - 'fq_nmod_mpoly/get_set_is_fq_nmod_poly.c', - 'fq_nmod_mpoly/get_str_pretty.c', - 'fq_nmod_mpoly/get_term.c', - 'fq_nmod_mpoly/get_term_coeff_fq_nmod.c', - 'fq_nmod_mpoly/get_term_exp_fmpz.c', - 'fq_nmod_mpoly/get_term_exp_si.c', - 'fq_nmod_mpoly/get_term_exp_ui.c', - 'fq_nmod_mpoly/get_term_monomial.c', - 'fq_nmod_mpoly/get_term_var_exp_si.c', - 'fq_nmod_mpoly/get_term_var_exp_ui.c', - 'fq_nmod_mpoly/inflate.c', - 'fq_nmod_mpoly/init.c', - 'fq_nmod_mpoly/inlines.c', - 'fq_nmod_mpoly/interp.c', - 'fq_nmod_mpoly/io.c', - 'fq_nmod_mpoly/is_canonical.c', - 'fq_nmod_mpoly/is_fq_nmod.c', - 'fq_nmod_mpoly/is_gen.c', - 'fq_nmod_mpoly/is_monic.c', - 'fq_nmod_mpoly/is_one.c', - 'fq_nmod_mpoly/lead_coeff_vars.c', - 'fq_nmod_mpoly/make_monic.c', - 'fq_nmod_mpoly/mpolyn.c', - 'fq_nmod_mpoly/mpolyn_gcd_brown.c', - 'fq_nmod_mpoly/mpolyu.c', - 'fq_nmod_mpoly/mpolyu_divides.c', - 'fq_nmod_mpoly/mpolyu_gcdp_zippel.c', - 'fq_nmod_mpoly/mpolyun.c', - 'fq_nmod_mpoly/mul.c', - 'fq_nmod_mpoly/mul_johnson.c', - 'fq_nmod_mpoly/neg.c', - 'fq_nmod_mpoly/one.c', - 'fq_nmod_mpoly/pow_fmpz.c', - 'fq_nmod_mpoly/pow_rmul.c', - 'fq_nmod_mpoly/pow_ui.c', - 'fq_nmod_mpoly/push_term_fq_nmod_fmpz.c', - 'fq_nmod_mpoly/push_term_fq_nmod_ui.c', - 'fq_nmod_mpoly/quadratic_root.c', - 'fq_nmod_mpoly/randtest_bits.c', - 'fq_nmod_mpoly/randtest_bound.c', - 'fq_nmod_mpoly/randtest_bounds.c', - 'fq_nmod_mpoly/realloc.c', - 'fq_nmod_mpoly/repack_bits.c', - 'fq_nmod_mpoly/resize.c', - 'fq_nmod_mpoly/resultant.c', - 'fq_nmod_mpoly/reverse.c', - 'fq_nmod_mpoly/scalar_addmul_fq_nmod.c', - 'fq_nmod_mpoly/scalar_mul_fq_nmod.c', - 'fq_nmod_mpoly/set.c', - 'fq_nmod_mpoly/set_coeff_fq_nmod_fmpz.c', - 'fq_nmod_mpoly/set_coeff_fq_nmod_monomial.c', - 'fq_nmod_mpoly/set_coeff_fq_nmod_ui.c', - 'fq_nmod_mpoly/set_fmpz.c', - 'fq_nmod_mpoly/setform.c', - 'fq_nmod_mpoly/set_fq_nmod.c', - 'fq_nmod_mpoly/set_fq_nmod_gen.c', - 'fq_nmod_mpoly/set_str_pretty.c', - 'fq_nmod_mpoly/set_term_coeff_fq_nmod.c', - 'fq_nmod_mpoly/set_term_exp_fmpz.c', - 'fq_nmod_mpoly/set_term_exp_ui.c', - 'fq_nmod_mpoly/sort_terms.c', - 'fq_nmod_mpoly/sqrt_heap.c', - 'fq_nmod_mpoly/sub.c', - 'fq_nmod_mpoly/sub_fq_nmod.c', - 'fq_nmod_mpoly/term_content.c', - 'fq_nmod_mpoly/term_exp_fits.c', - 'fq_nmod_mpoly/to_from_fq_nmod_poly.c', - 'fq_nmod_mpoly/univar.c', - 'fq_nmod_mpoly/void_ring.c', - 'fq_nmod/mul.c', - 'fq_nmod/mul_fmpz.c', - 'fq_nmod/mul_si.c', - 'fq_nmod/mul_ui.c', - 'fq_nmod/neg.c', - 'fq_nmod/norm.c', - 'fq_nmod_poly_factor/inlines.c', - 'fq_nmod_poly_factor/iterated_frobenius_cutoff.c', - 'fq_nmod/poly_factor_templates.c', - 'fq_nmod_poly/inlines.c', - 'fq_nmod_poly/mul.c', - 'fq_nmod_poly/mul_classical.c', - 'fq_nmod_poly/mullow_univariate.c', - 'fq_nmod_poly/mul_univariate.c', - 'fq_nmod/poly_templates.c', - 'fq_nmod/pow.c', - 'fq_nmod/pth_root.c', - 'fq_nmod/rand.c', - 'fq_nmod/randtest.c', - 'fq_nmod/reduce.c', - 'fq_nmod/set_fmpz.c', - 'fq_nmod/set_nmod_poly.c', - 'fq_nmod/sqr.c', - 'fq_nmod/sub.c', - 'fq_nmod/sub_one.c', - 'fq_nmod/templates.c', - 'fq_nmod/trace.c', - 'fq_nmod_vec/dot.c', - 'fq_nmod_vec/inlines.c', - 'fq_nmod/vec_templates.c', - 'fq/norm.c', - 'fq_poly_factor/inlines.c', - 'fq_poly_factor/iterated_frobenius_cutoff.c', - 'fq/poly_factor_templates.c', - 'fq_poly_factor_templates/clear.c', - 'fq_poly_factor_templates/concat.c', - 'fq_poly_factor_templates/factor_berlekamp.c', - 'fq_poly_factor_templates/factor.c', - 'fq_poly_factor_templates/factor_cantor_zassenhaus.c', - 'fq_poly_factor_templates/factor_distinct_deg.c', - 'fq_poly_factor_templates/factor_equal_deg.c', - 'fq_poly_factor_templates/factor_equal_deg_prob.c', - 'fq_poly_factor_templates/factor_kaltofen_shoup.c', - 'fq_poly_factor_templates/factor_split_single.c', - 'fq_poly_factor_templates/factor_squarefree.c', - 'fq_poly_factor_templates/fit_length.c', - 'fq_poly_factor_templates/init.c', - 'fq_poly_factor_templates/insert.c', - 'fq_poly_factor_templates/is_irreducible_ben_or.c', - 'fq_poly_factor_templates/is_irreducible.c', - 'fq_poly_factor_templates/is_irreducible_ddf.c', - 'fq_poly_factor_templates/is_squarefree.c', - 'fq_poly_factor_templates/iterated_frobenius_preinv.c', - 'fq_poly_factor_templates/pow.c', - 'fq_poly_factor_templates/print.c', - 'fq_poly_factor_templates/print_pretty.c', - 'fq_poly_factor_templates/realloc.c', - 'fq_poly_factor_templates/roots.c', - 'fq_poly_factor_templates/set.c', - 'fq_poly/inlines.c', - 'fq_poly/mul_classical.c', - 'fq_poly/mullow_univariate.c', - 'fq_poly/mul_univariate.c', - 'fq_poly_templates/add.c', - 'fq_poly_templates/add_series.c', - 'fq_poly_templates/add_si.c', - 'fq/poly_templates.c', - 'fq_poly_templates/clear.c', - 'fq_poly_templates/comparisons.c', - 'fq_poly_templates/compose.c', - 'fq_poly_templates/compose_mod_brent_kung.c', - 'fq_poly_templates/compose_mod_brent_kung_precomp_preinv.c', - 'fq_poly_templates/compose_mod_brent_kung_preinv.c', - 'fq_poly_templates/compose_mod.c', - 'fq_poly_templates/compose_mod_horner.c', - 'fq_poly_templates/compose_mod_horner_preinv.c', - 'fq_poly_templates/compose_mod_preinv.c', - 'fq_poly_templates/deflate.c', - 'fq_poly_templates/deflation.c', - 'fq_poly_templates/derivative.c', - 'fq_poly_templates/div.c', - 'fq_poly_templates/divides.c', - 'fq_poly_templates/div_newton_n_preinv.c', - 'fq_poly_templates/divrem.c', - 'fq_poly_templates/divrem_f.c', - 'fq_poly_templates/divrem_newton_n_preinv.c', - 'fq_poly_templates/div_series.c', - 'fq_poly_templates/equal.c', - 'fq_poly_templates/equal_trunc.c', - 'fq_poly_templates/evaluate_fq.c', - 'fq_poly_templates/evaluate_fq_vec.c', - 'fq_poly_templates/evaluate_fq_vec_fast.c', - 'fq_poly_templates/evaluate_fq_vec_iter.c', - 'fq_poly_templates/fit_length.c', - 'fq_poly_templates/gcd.c', - 'fq_poly_templates/gcd_euclidean_f.c', - 'fq_poly_templates/gen.c', - 'fq_poly_templates/get_coeff.c', - 'fq_poly_templates/get_str.c', - 'fq_poly_templates/get_str_pretty.c', - 'fq_poly_templates/hamming_weight.c', - 'fq_poly_templates/inflate.c', - 'fq_poly_templates/init.c', - 'fq_poly_templates/inv_series_newton.c', - 'fq_poly_templates/invsqrt_series.c', - 'fq_poly_templates/io.c', - 'fq_poly_templates/is_gen.c', - 'fq_poly_templates/make_monic.c', - 'fq_poly_templates/mul.c', - 'fq_poly_templates/mul_classical.c', - 'fq_poly_templates/mulhigh.c', - 'fq_poly_templates/mulhigh_classical.c', - 'fq_poly_templates/mul_KS.c', - 'fq_poly_templates/mullow.c', - 'fq_poly_templates/mullow_classical.c', - 'fq_poly_templates/mullow_KS.c', - 'fq_poly_templates/mulmod.c', - 'fq_poly_templates/mulmod_preinv.c', - 'fq_poly_templates/mul_reorder.c', - 'fq_poly_templates/neg.c', - 'fq_poly_templates/normalise.c', - 'fq_poly_templates/one.c', - 'fq_poly_templates/pow.c', - 'fq_poly_templates/powmod_fmpz_binexp.c', - 'fq_poly_templates/powmod_fmpz_binexp_preinv.c', - 'fq_poly_templates/powmod_fmpz_sliding_preinv.c', - 'fq_poly_templates/powmod_ui_binexp.c', - 'fq_poly_templates/powmod_ui_binexp_preinv.c', - 'fq_poly_templates/powmod_x_fmpz_preinv.c', - 'fq_poly_templates/pow_trunc_binexp.c', - 'fq_poly_templates/pow_trunc.c', - 'fq_poly_templates/randtest.c', - 'fq_poly_templates/randtest_irreducible.c', - 'fq_poly_templates/randtest_monic.c', - 'fq_poly_templates/realloc.c', - 'fq_poly_templates/rem.c', - 'fq_poly_templates/remove.c', - 'fq_poly_templates/reverse.c', - 'fq_poly_templates/scalar_addmul_fq.c', - 'fq_poly_templates/scalar_div_fq.c', - 'fq_poly_templates/scalar_mul_fq.c', - 'fq_poly_templates/scalar_submul_fq.c', - 'fq_poly_templates/set.c', - 'fq_poly_templates/set_coeff.c', - 'fq_poly_templates/set_fmpz_mod_poly.c', - 'fq_poly_templates/set_fq.c', - 'fq_poly_templates/set_length.c', - 'fq_poly_templates/set_nmod_poly.c', - 'fq_poly_templates/set_trunc.c', - 'fq_poly_templates/shift_left.c', - 'fq_poly_templates/shift_right.c', - 'fq_poly_templates/sqr.c', - 'fq_poly_templates/sqr_classical.c', - 'fq_poly_templates/sqr_KS.c', - 'fq_poly_templates/sqr_reorder.c', - 'fq_poly_templates/sqrt.c', - 'fq_poly_templates/sqrt_series.c', - 'fq_poly_templates/sub.c', - 'fq_poly_templates/sub_series.c', - 'fq_poly_templates/swap.c', - 'fq_poly_templates/tree.c', - 'fq_poly_templates/truncate.c', - 'fq_poly_templates/xgcd.c', - 'fq_poly_templates/xgcd_euclidean_f.c', - 'fq_poly_templates/zero.c', - 'fq/pow.c', - 'fq/pow_ui.c', - 'fq/pth_root.c', - 'fq/rand.c', - 'fq/randtest.c', - 'fq/reduce.c', - 'fq/set_fmpz_mod_poly.c', - 'fq/set_fmpz_poly.c', - 'fq/sqr.c', - 'fq/sub.c', - 'fq/sub_one.c', - 'fq/swap.c', - 'fq/templates.c', - 'fq_templates/div.c', - 'fq_templates/is_invertible.c', - 'fq_templates/is_invertible_f.c', - 'fq_templates/is_square.c', - 'fq_templates/multiplicative_order.c', - 'fq_templates/sqrt.c', - 'fq/trace.c', - 'fq_vec/dot.c', - 'fq_vec/inlines.c', - 'fq_vec_templates/add.c', - 'fq/vec_templates.c', - 'fq_vec_templates/clear.c', - 'fq_vec_templates/dot.c', - 'fq_vec_templates/equal.c', - 'fq_vec_templates/init.c', - 'fq_vec_templates/io.c', - 'fq_vec_templates/is_zero.c', - 'fq_vec_templates/neg.c', - 'fq_vec_templates/randtest.c', - 'fq_vec_templates/scalar_addmul_fq.c', - 'fq_vec_templates/scalar_mul_fq.c', - 'fq_vec_templates/scalar_submul_fq.c', - 'fq_vec_templates/set.c', - 'fq_vec_templates/sub.c', - 'fq_vec_templates/swap.c', - 'fq_vec_templates/zero.c', - 'fq_zech/add.c', - 'fq_zech/bit_pack.c', - 'fq_zech/bit_unpack.c', - 'fq_zech/ctx.c', - 'fq_zech_embed/composition_matrix.c', - 'fq_zech_embed/modulus_derivative_inv.c', - 'fq_zech_embed/mul_matrix.c', - 'fq_zech/embed_templates.c', - 'fq_zech/frobenius.c', - 'fq_zech/gcdinv.c', - 'fq_zech/get_fmpz.c', - 'fq_zech/get_fq_nmod.c', - 'fq_zech/get_nmod_poly.c', - 'fq_zech/get_set_fmpz_mod_mat.c', - 'fq_zech/get_str.c', - 'fq_zech/inlines.c', - 'fq_zech/inv.c', - 'fq_zech/io.c', - 'fq_zech/is_square.c', - 'fq_zech_mat/inlines.c', - 'fq_zech_mat/mul_ks_cutoff.c', - 'fq_zech/mat_templates.c', - 'fq_zech/modulus_pow_series_inv.c', - 'fq_zech_mpoly/add.c', - 'fq_zech_mpoly/clear.c', - 'fq_zech_mpoly/combine_like_terms.c', - 'fq_zech_mpoly/ctx.c', - 'fq_zech_mpoly/degrees.c', - 'fq_zech_mpoly/derivative.c', - 'fq_zech_mpoly/divides.c', - 'fq_zech_mpoly/divides_monagan_pearce.c', - 'fq_zech_mpoly/divrem.c', - 'fq_zech_mpoly/divrem_monagan_pearce.c', - 'fq_zech_mpoly/equal.c', - 'fq_zech_mpoly/evaluate_all.c', - 'fq_zech_mpoly/evaluate_one.c', - 'fq_zech_mpoly_factor/bpoly.c', - 'fq_zech_mpoly_factor/bpoly_factor_smprime.c', - 'fq_zech_mpoly_factor/bpoly_hlift.c', - 'fq_zech_mpoly_factor/clear.c', - 'fq_zech_mpoly_factor/eval.c', - 'fq_zech_mpoly_factor/factor.c', - 'fq_zech_mpoly_factor/fit_length.c', - 'fq_zech_mpoly_factor/get_set_is_fq_nmod_poly.c', - 'fq_zech_mpoly_factor/get_set_lead0.c', - 'fq_zech_mpoly_factor/init.c', - 'fq_zech_mpoly_factor/io.c', - 'fq_zech_mpoly_factor/irred_smprime_wang.c', - 'fq_zech_mpoly_factor/irred_smprime_zassenhaus.c', - 'fq_zech_mpoly_factor/irred_smprime_zippel.c', - 'fq_zech_mpoly_factor/lcc_wang.c', - 'fq_zech_mpoly_factor/mpoly_hlift.c', - 'fq_zech_mpoly_factor/mpoly_pfrac.c', - 'fq_zech_mpoly_factor/mpoly_univar.c', - 'fq_zech_mpoly_factor/mpolyv.c', - 'fq_zech_mpoly_factor/polyu3_hlift.c', - 'fq_zech_mpoly_factor/polyu.c', - 'fq_zech_mpoly_factor/polyun.c', - 'fq_zech_mpoly_factor/realloc.c', - 'fq_zech_mpoly_factor/tpoly.c', - 'fq_zech_mpoly/fit_bits.c', - 'fq_zech_mpoly/fit_length.c', - 'fq_zech_mpoly/gcd.c', - 'fq_zech_mpoly/gcd_cofactors.c', - 'fq_zech_mpoly/gen.c', - 'fq_zech_mpoly/get_coeff_vars_ui.c', - 'fq_zech_mpoly/get_set_fq_nmod_mpoly.c', - 'fq_zech_mpoly/get_set_nmod_mpoly.c', - 'fq_zech_mpoly/init.c', - 'fq_zech_mpoly/io.c', - 'fq_zech_mpoly/is_canonical.c', - 'fq_zech_mpoly/is_fq_zech.c', - 'fq_zech_mpoly/is_one.c', - 'fq_zech_mpoly/lead_coeff_vars.c', - 'fq_zech_mpoly/make_monic.c', - 'fq_zech_mpoly/mpolyu.c', - 'fq_zech_mpoly/mul.c', - 'fq_zech_mpoly/mul_johnson.c', - 'fq_zech_mpoly/neg.c', - 'fq_zech_mpoly/pow_rmul.c', - 'fq_zech_mpoly/pow_ui.c', - 'fq_zech_mpoly/repack_bits.c', - 'fq_zech_mpoly/scalar.c', - 'fq_zech_mpoly/set.c', - 'fq_zech_mpoly/set_fq_zech.c', - 'fq_zech_mpoly/set_ui.c', - 'fq_zech_mpoly/sort_terms.c', - 'fq_zech_mpoly/sub.c', - 'fq_zech_mpoly/sub_fq_zech.c', - 'fq_zech_mpoly/term_exp_fits.c', - 'fq_zech_mpoly/univar.c', - 'fq_zech/mul.c', - 'fq_zech/neg.c', - 'fq_zech/norm.c', - 'fq_zech_poly_factor/inlines.c', - 'fq_zech_poly_factor/iterated_frobenius_cutoff.c', - 'fq_zech/poly_factor_templates.c', - 'fq_zech_poly/inlines.c', - 'fq_zech/poly_templates.c', - 'fq_zech/pow.c', - 'fq_zech/pth_root.c', - 'fq_zech/rand.c', - 'fq_zech/randtest.c', - 'fq_zech/set.c', - 'fq_zech/set_fmpz.c', - 'fq_zech/set_fq_nmod.c', - 'fq_zech/set_nmod_poly.c', - 'fq_zech/sqr.c', - 'fq_zech/sqrt.c', - 'fq_zech/sub.c', - 'fq_zech/sub_one.c', - 'fq_zech/templates.c', - 'fq_zech/trace.c', - 'fq_zech_vec/inlines.c', - 'fq_zech/vec_templates.c', - 'generic_files/clz_tab.c', - 'generic_files/exception.c', - 'generic_files/fscanf.c', - 'generic_files/gettimeofday.c', - 'generic_files/inlines.c', - 'generic_files/io.c', - 'generic_files/memory_manager.c', - 'generic_files/profiler.c', - 'generic_files/scanf.c', - 'generic_files/sprintf.c', - 'generic_files/sscanf.c', - 'generic_files/test_helpers.c', - 'generic_files/version.c', - 'gr/acb.c', - 'gr/acf.c', - 'gr/arb.c', - 'gr/arf.c', - 'gr/ca.c', - 'gr/cmp_coercion.c', - 'gr/dirichlet.c', - 'gr/fexpr.c', - 'gr/fmpq.c', - 'gr/fmpq_poly.c', - 'gr/fmpz.c', - 'gr/fmpzi.c', - 'gr/fmpz_mod.c', - 'gr/fmpz_mpoly.c', - 'gr/fmpz_mpoly_q.c', - 'gr/fmpz_poly.c', - 'gr/fq.c', - 'gr/fq_nmod.c', - 'gr/fq_zech.c', - 'gr_generic/fmpz_mpoly_evaluate.c', - 'gr_generic/fmpz_poly_evaluate.c', - 'gr_generic/fmpz_poly_evaluate_horner.c', - 'gr_generic/fmpz_poly_evaluate_rectangular.c', - 'gr_generic/generic.c', - 'gr_generic/generic_pow.c', - 'gr_generic/set_fexpr.c', - 'gr_generic/set_str_expr.c', - 'gr/init_random.c', - 'gr/inlines.c', - 'gr/io.c', - 'gr_mat/add.c', - 'gr_mat/addmul_scalar.c', - 'gr_mat/add_scalar.c', - 'gr_mat/adjugate.c', - 'gr_mat/adjugate_charpoly.c', - 'gr_mat/adjugate_cofactor.c', - 'gr_mat/apply_row_similarity.c', - 'gr_mat/charpoly_berkowitz.c', - 'gr_mat/charpoly.c', - 'gr_mat/charpoly_danilevsky.c', - 'gr_mat/charpoly_faddeev_bsgs.c', - 'gr_mat/charpoly_faddeev.c', - 'gr_mat/charpoly_hessenberg.c', - 'gr_mat/clear.c', - 'gr_mat/concat_horizontal.c', - 'gr_mat/concat_vertical.c', - 'gr_mat/det_berkowitz.c', - 'gr_mat/det.c', - 'gr_mat/det_cofactor.c', - 'gr_mat/det_fflu.c', - 'gr_mat/det_lu.c', - 'gr_mat/diag_mul.c', - 'gr_mat/diagonalization.c', - 'gr_mat/div_scalar.c', - 'gr_mat/eigenvalues.c', - 'gr_mat/equal.c', - 'gr_mat/exp.c', - 'gr_mat/fflu.c', - 'gr_mat/find_nonzero_pivot.c', - 'gr_mat/gr_poly_evaluate.c', - 'gr_mat/hadamard.c', - 'gr_mat/hessenberg.c', - 'gr_mat/hessenberg_gauss.c', - 'gr_mat/hessenberg_householder.c', - 'gr_mat/hilbert.c', - 'gr_mat/init.c', - 'gr_mat/init_set.c', - 'gr_mat/inlines.c', - 'gr_mat/inv.c', - 'gr_mat/invert_cols.c', - 'gr_mat/invert_rows.c', - 'gr_mat/io.c', - 'gr_mat/is_diagonal.c', - 'gr_mat/is_hessenberg.c', - 'gr_mat/is_lower_triangular.c', - 'gr_mat/is_neg_one.c', - 'gr_mat/is_one.c', - 'gr_mat/is_scalar.c', - 'gr_mat/is_upper_triangular.c', - 'gr_mat/is_zero.c', - 'gr_mat/jordan_blocks.c', - 'gr_mat/jordan_form.c', - 'gr_mat/jordan_transformation.c', - 'gr_mat/log.c', - 'gr_mat/lu.c', - 'gr_mat/lu_classical.c', - 'gr_mat/lu_recursive.c', - 'gr_mat/minpoly_field.c', - 'gr_mat/mul.c', - 'gr_mat/mul_classical.c', - 'gr_mat/mul_diag.c', - 'gr_mat/mul_scalar.c', - 'gr_mat/mul_strassen.c', - 'gr_mat/neg.c', - 'gr_mat/nonsingular_solve.c', - 'gr_mat/nonsingular_solve_den.c', - 'gr_mat/nonsingular_solve_den_fflu.c', - 'gr_mat/nonsingular_solve_fflu.c', - 'gr_mat/nonsingular_solve_fflu_precomp.c', - 'gr_mat/nonsingular_solve_lu.c', - 'gr_mat/nonsingular_solve_lu_precomp.c', - 'gr_mat/nonsingular_solve_tril.c', - 'gr_mat/nonsingular_solve_triu.c', - 'gr_mat/nullspace.c', - 'gr_mat/one.c', - 'gr_mat/ones.c', - 'gr_mat/pascal.c', - 'gr_mat/randops.c', - 'gr_mat/randpermdiag.c', - 'gr_mat/randrank.c', - 'gr_mat/randtest.c', - 'gr_mat/rank.c', - 'gr_mat/rank_fflu.c', - 'gr_mat/rank_lu.c', - 'gr_mat/reduce_row.c', - 'gr/matrix.c', - 'gr_mat/rref.c', - 'gr_mat/rref_den.c', - 'gr_mat/rref_fflu.c', - 'gr_mat/rref_lu.c', - 'gr_mat/set.c', - 'gr_mat/set_fmpq.c', - 'gr_mat/set_fmpq_mat.c', - 'gr_mat/set_fmpz.c', - 'gr_mat/set_fmpz_mat.c', - 'gr_mat/set_scalar.c', - 'gr_mat/set_si.c', - 'gr_mat/set_ui.c', - 'gr_mat/solve_field.c', - 'gr_mat/stirling.c', - 'gr_mat/sub.c', - 'gr_mat/submul_scalar.c', - 'gr_mat/sub_scalar.c', - 'gr_mat/swap_cols.c', - 'gr_mat/swap_entrywise.c', - 'gr_mat/swap_rows.c', - 'gr_mat/trace.c', - 'gr_mat/transpose.c', - 'gr_mat/window_init.c', - 'gr_mat/write.c', - 'gr_mat/zero.c', - 'gr_mpoly/add.c', - 'gr/mpoly.c', - 'gr_mpoly/combine_like_terms.c', - 'gr_mpoly/equal.c', - 'gr_mpoly/fit_bits.c', - 'gr_mpoly/fit_length.c', - 'gr_mpoly/fit_length_fit_bits.c', - 'gr_mpoly/fit_length_reset_bits.c', - 'gr_mpoly/gen.c', - 'gr_mpoly/get_coeff_scalar_fmpz.c', - 'gr_mpoly/get_coeff_scalar_ui.c', - 'gr_mpoly/init.c', - 'gr_mpoly/inlines.c', - 'gr_mpoly/is_canonical.c', - 'gr_mpoly/mul.c', - 'gr_mpoly/mul_johnson.c', - 'gr_mpoly/mul_monomial.c', - 'gr_mpoly/mul_scalar.c', - 'gr_mpoly/neg.c', - 'gr_mpoly/push_term.c', - 'gr_mpoly/randtest_bits.c', - 'gr_mpoly/randtest_bound.c', - 'gr_mpoly/set.c', - 'gr_mpoly/set_coeff_scalar_fmpz.c', - 'gr_mpoly/set_coeff_scalar_ui.c', - 'gr_mpoly/set_scalar.c', - 'gr_mpoly/sort_terms.c', - 'gr_mpoly/sub.c', - 'gr_mpoly/write.c', - 'gr/nf.c', - 'gr/nmod32.c', - 'gr/nmod8.c', - 'gr/nmod.c', - 'gr/perm.c', - 'gr_poly/add.c', - 'gr_poly/asin_series.c', - 'gr_poly/clear.c', - 'gr_poly/compose.c', - 'gr_poly/compose_divconquer.c', - 'gr_poly/compose_horner.c', - 'gr_poly/compose_series_brent_kung.c', - 'gr_poly/compose_series.c', - 'gr_poly/compose_series_divconquer.c', - 'gr_poly/compose_series_horner.c', - 'gr_poly/derivative.c', - 'gr_poly/div_basecase.c', - 'gr_poly/div.c', - 'gr_poly/div_divconquer.c', - 'gr_poly/divexact_basecase.c', - 'gr_poly/divexact_bidirectional.c', - 'gr_poly/divexact.c', - 'gr_poly/divexact_series_basecase.c', - 'gr_poly/div_newton.c', - 'gr_poly/divrem_basecase.c', - 'gr_poly/divrem.c', - 'gr_poly/divrem_divconquer.c', - 'gr_poly/divrem_newton.c', - 'gr_poly/div_scalar.c', - 'gr_poly/div_series_basecase.c', - 'gr_poly/div_series.c', - 'gr_poly/div_series_divconquer.c', - 'gr_poly/div_series_invmul.c', - 'gr_poly/div_series_newton.c', - 'gr_poly/equal.c', - 'gr_poly/evaluate.c', - 'gr_poly/evaluate_horner.c', - 'gr_poly/evaluate_modular.c', - 'gr_poly/evaluate_other.c', - 'gr_poly/evaluate_other_horner.c', - 'gr_poly/evaluate_other_rectangular.c', - 'gr_poly/evaluate_rectangular.c', - 'gr_poly/evaluate_vec_fast.c', - 'gr_poly/evaluate_vec_iter.c', - 'gr_poly/exp_series_basecase.c', - 'gr_poly/exp_series_basecase_mul.c', - 'gr_poly/exp_series.c', - 'gr_poly/exp_series_newton.c', - 'gr_poly/factor_squarefree.c', - 'gr_poly/fit_length.c', - 'gr_poly/gcd.c', - 'gr_poly/gcd_euclidean.c', - 'gr_poly/gcd_hgcd.c', - 'gr_poly/gen.c', - 'gr_poly/get_coeff_scalar.c', - 'gr_poly/hgcd.c', - 'gr_poly/init.c', - 'gr_poly/inlines.c', - 'gr_poly/integral.c', - 'gr_poly/inv.c', - 'gr_poly/inv_series_basecase.c', - 'gr_poly/inv_series.c', - 'gr_poly/inv_series_newton.c', - 'gr_poly/is_gen.c', - 'gr_poly/is_monic.c', - 'gr_poly/is_one.c', - 'gr_poly/is_scalar.c', - 'gr_poly/is_zero.c', - 'gr_poly/log1p_series.c', - 'gr_poly/log_series.c', - 'gr_poly/make_monic.c', - 'gr_poly/mul.c', - 'gr_poly/mullow.c', - 'gr_poly/mul_scalar.c', - 'gr_poly/neg.c', - 'gr_poly/neg_one.c', - 'gr/polynomial.c', - 'gr_poly/normalise.c', - 'gr_poly/nth_derivative.c', - 'gr_poly/one.c', - 'gr_poly/pow_fmpz.c', - 'gr_poly/pow_series_fmpq_recurrence.c', - 'gr_poly/pow_series_ui_binexp.c', - 'gr_poly/pow_series_ui.c', - 'gr_poly/pow_ui_binexp.c', - 'gr_poly/pow_ui.c', - 'gr_poly/randtest.c', - 'gr_poly/rem.c', - 'gr_poly/resultant.c', - 'gr_poly/resultant_euclidean.c', - 'gr_poly/resultant_hgcd.c', - 'gr_poly/resultant_small.c', - 'gr_poly/resultant_sylvester.c', - 'gr_poly/reverse.c', - 'gr_poly/revert_series.c', - 'gr_poly/rsqrt_series_basecase.c', - 'gr_poly/rsqrt_series.c', - 'gr_poly/rsqrt_series_miller.c', - 'gr_poly/rsqrt_series_newton.c', - 'gr_poly/set.c', - 'gr_poly/set_coeff_scalar.c', - 'gr_poly/set_fmpq_poly.c', - 'gr_poly/set_fmpz_poly.c', - 'gr_poly/set_gr_poly_other.c', - 'gr_poly/set_length.c', - 'gr_poly/set_scalar.c', - 'gr_poly/shift_left.c', - 'gr_poly/shift_right.c', - 'gr_poly/sin_cos_series_basecase.c', - 'gr_poly/sin_cos_series_tangent.c', - 'gr_poly/sqrt_series_basecase.c', - 'gr_poly/sqrt_series.c', - 'gr_poly/sqrt_series_miller.c', - 'gr_poly/sqrt_series_newton.c', - 'gr_poly/squarefree_part.c', - 'gr_poly/sub.c', - 'gr_poly/tan_series_basecase.c', - 'gr_poly/tan_series.c', - 'gr_poly/tan_series_newton.c', - 'gr_poly/taylor_shift.c', - 'gr_poly/taylor_shift_convolution.c', - 'gr_poly/taylor_shift_divconquer.c', - 'gr_poly/taylor_shift_horner.c', - 'gr_poly/truncate.c', - 'gr_poly/write.c', - 'gr_poly/xgcd_euclidean.c', - 'gr_poly/xgcd_hgcd.c', - 'gr/psl2z.c', - 'gr/qqbar.c', - 'gr/series.c', - 'gr/series_mod.c', - 'gr_special/bellnum.c', - 'gr_special/bin.c', - 'gr_special/chebyshev_t.c', - 'gr_special/chebyshev_u.c', - 'gr_special/dirichlet.c', - 'gr_special/elementary.c', - 'gr_special/erf.c', - 'gr_special/fac.c', - 'gr_special/fib.c', - 'gr_special/inlines.c', - 'gr_special/modular.c', - 'gr_special/partitions.c', - 'gr/test_ring.c', - 'gr_vec/append.c', - 'gr_vec/clear.c', - 'gr_vec/fit_length.c', - 'gr_vec/init.c', - 'gr_vec/inlines.c', - 'gr_vec/product.c', - 'gr_vec/randtest.c', - 'gr_vec/set.c', - 'gr_vec/set_length.c', - 'gr_vec/step.c', - 'gr_vec/sum.c', - 'gr/vector.c', - 'gr_vec/write.c', - 'hypgeom/bound.c', - 'hypgeom/estimate_terms_d.c', - 'hypgeom/init.c', - 'hypgeom/precompute.c', - 'hypgeom/sum.c', - 'long_extras/inlines.c', - 'long_extras/kronecker.c', - 'long_extras/randint.c', - 'long_extras/randtest.c', - 'long_extras/sizeinbase.c', - 'mag/add_2exp_fmpz.c', - 'mag/add.c', - 'mag/addmul.c', - 'mag/add_ui_2exp_si.c', - 'mag/add_ui.c', - 'mag/atan.c', - 'mag/bernoulli_div_fac_ui.c', - 'mag/binpow_uiui.c', - 'mag/bin_uiui.c', - 'mag/clear.c', - 'mag/cmp_2exp_si.c', - 'mag/cmp.c', - 'mag/const_pi.c', - 'mag/cosh.c', - 'mag/div.c', - 'mag/div_lower.c', - 'mag/d_log.c', - 'mag/exp.c', - 'mag/expinv.c', - 'mag/expm1.c', - 'mag/exp_tail.c', - 'mag/fac_ui.c', - 'mag/geom_series.c', - 'mag/get_d.c', - 'mag/get_d_log2_approx.c', - 'mag/get_fmpq.c', - 'mag/get_fmpz.c', - 'mag/hurwitz_zeta_uiui.c', - 'mag/hypot.c', - 'mag/inlines.c', - 'mag/io.c', - 'mag/log1p.c', - 'mag/log.c', - 'mag/log_ui.c', - 'mag/mul_2exp_fmpz.c', - 'mag/mul_2exp_si.c', - 'mag/mul.c', - 'mag/polylog_tail.c', - 'mag/pow_fmpz.c', - 'mag/pow_ui.c', - 'mag/randtest.c', - 'mag/root.c', - 'mag/rsqrt.c', - 'mag/set_d_2exp_fmpz.c', - 'mag/set_d.c', - 'mag/set_fmpz_2exp_fmpz.c', - 'mag/set_ui_2exp_si.c', - 'mag/set_ui.c', - 'mag/sinh.c', - 'mag/sqrt.c', - 'mag/sub.c', - 'mag/sub_lower.c', - 'mpfr_mat/clear.c', - 'mpfr_mat/equal.c', - 'mpfr_mat/init.c', - 'mpfr_mat/mul_classical.c', - 'mpfr_mat/randtest.c', - 'mpfr_mat/set.c', - 'mpfr_mat/swap.c', - 'mpfr_mat/zero.c', - 'mpfr_vec/add.c', - 'mpfr_vec/clear.c', - 'mpfr_vec/equal.c', - 'mpfr_vec/init.c', - 'mpfr_vec/randtest.c', - 'mpfr_vec/scalar_mul_2exp.c', - 'mpfr_vec/scalar_mul_mpfr.c', - 'mpfr_vec/scalar_product.c', - 'mpfr_vec/set.c', - 'mpfr_vec/zero.c', - 'mpn_extras/debug.c', - 'mpn_extras/divides.c', - 'mpn_extras/divrem_preinv1.c', - 'mpn_extras/divrem_preinvn.c', - 'mpn_extras/factor_trial.c', - 'mpn_extras/factor_trial_tree.c', - 'mpn_extras/fmms1.c', - 'mpn_extras/gcd_full.c', - 'mpn_extras/get_d.c', - 'mpn_extras/mod_preinvn.c', - 'mpn_extras/mul_basecase.c', - 'mpn_extras/mul.c', - 'mpn_extras/mulhigh_basecase.c', - 'mpn_extras/mulhigh.c', - 'mpn_extras/mulmod_2expp1_basecase.c', - 'mpn_extras/mulmod_preinv1.c', - 'mpn_extras/mulmod_preinvn.c', - 'mpn_extras/mul_toom22.c', - 'mpn_extras/mul_toom32.c', - 'mpn_extras/preinv1.c', - 'mpn_extras/preinvn.c', - 'mpn_extras/remove_2exp.c', - 'mpn_extras/remove_power.c', - 'mpn_extras/sqr_basecase.c', - 'mpn_extras/sqrhigh.c', - 'mpn_extras/sumdiff_n.c', - 'mpoly/bidegree.c', - 'mpoly/bivar_cld_bounds.c', - 'mpoly/cmp_general.c', - 'mpoly/compose_mat.c', - 'mpoly/compression.c', - 'mpoly/ctx.c', - 'mpoly/degrees.c', - 'mpoly/exp_bits_required.c', - 'mpoly/fill_marks.c', - 'mpoly/gcd_info.c', - 'mpoly/gen_bits_required.c', - 'mpoly/gen_fields.c', - 'mpoly/gen_monomial_offset_shift.c', - 'mpoly/gen_shift_left_right.c', - 'mpoly/get_cmpmask.c', - 'mpoly/get_monomial.c', - 'mpoly/get_monomial_var.c', - 'mpoly/heap_insert1.c', - 'mpoly/heap_insert.c', - 'mpoly/heap_pop1.c', - 'mpoly/heap_pop.c', - 'mpoly/inlines.c', - 'mpoly/io.c', - 'mpoly/is_gen.c', - 'mpoly/is_poly.c', - 'mpoly/is_proved_not_square.c', - 'mpoly/main_variable_split.c', - 'mpoly/max_fields.c', - 'mpoly/min_fields.c', - 'mpoly/monomial_cofactors.c', - 'mpoly/monomial_exists.c', - 'mpoly/monomial_index.c', - 'mpoly/monomial_mul_fmpz.c', - 'mpoly/monomials_cmp.c', - 'mpoly/monomials_deflate.c', - 'mpoly/monomials_deflation.c', - 'mpoly/monomials_inflate.c', - 'mpoly/monomials_inorder_test.c', - 'mpoly/monomials_overflow_test.c', - 'mpoly/monomials_shift_right_ui.c', - 'mpoly/monomials_valid_test.c', - 'mpoly/pack_monomials_tight.c', - 'mpoly/pack_vec.c', - 'mpoly/parse_pretty.c', - 'mpoly/randbits_fmpz.c', - 'mpoly/rbtree.c', - 'mpoly/remove_var_powers.c', - 'mpoly/repack_monomials.c', - 'mpoly/reverse.c', - 'mpoly/search_monomials.c', - 'mpoly/set_monomial.c', - 'mpoly/term_exp_fits.c', - 'mpoly/test_irreducible.c', - 'mpoly/to_from_mpolyl.c', - 'mpoly/total_degree.c', - 'mpoly/univar.c', - 'mpoly/unpack_monomials_tight.c', - 'mpoly/unpack_vec.c', - 'mpoly/used_vars.c', - 'nf/clear.c', - 'nf_elem/add.c', - 'nf_elem/clear.c', - 'nf_elem/div.c', - 'nf_elem/equal.c', - 'nf_elem/gen.c', - 'nf_elem/get_coeff_fmpq.c', - 'nf_elem/get_coeff_fmpz.c', - 'nf_elem/get_fmpq_poly.c', - 'nf_elem/get_fmpz_mat_row.c', - 'nf_elem/get_fmpz_mod_poly.c', - 'nf_elem/get_nmod_poly.c', - 'nf_elem/get_str_pretty.c', - 'nf_elem/init.c', - 'nf_elem/inlines.c', - 'nf_elem/inv.c', - 'nf_elem/invertible_check.c', - 'nf_elem/io.c', - 'nf_elem/is_gen.c', - 'nf_elem/mod_fmpz.c', - 'nf_elem/mul.c', - 'nf_elem/mul_gen.c', - 'nf_elem/neg.c', - 'nf_elem/norm.c', - 'nf_elem/norm_div.c', - 'nf_elem/one.c', - 'nf_elem/pow.c', - 'nf_elem/randtest.c', - 'nf_elem/reduce.c', - 'nf_elem/rep_mat.c', - 'nf_elem/rep_mat_fmpz_mat_den.c', - 'nf_elem/scalar_div.c', - 'nf_elem/scalar_mul.c', - 'nf_elem/set.c', - 'nf_elem/set_coeff_num_fmpz.c', - 'nf_elem/set_fmpq_poly.c', - 'nf_elem/set_fmpz_mat_row.c', - 'nf_elem/sub.c', - 'nf_elem/swap.c', - 'nf_elem/trace.c', - 'nf_elem/zero.c', - 'nf/init.c', - 'nf/init_randtest.c', - 'nf/print.c', - 'nmod/divides.c', - 'nmod/inlines.c', - 'nmod_mat/add.c', - 'nmod_mat/addmul.c', - 'nmod_mat/can_solve.c', - 'nmod_mat/charpoly.c', - 'nmod_mat/clear.c', - 'nmod_mat/concat.c', - 'nmod_mat/det.c', - 'nmod_mat/det_howell.c', - 'nmod_mat/equal.c', - 'nmod_mat/howell_form.c', - 'nmod_mat/init.c', - 'nmod_mat/inlines.c', - 'nmod_mat/inv.c', - 'nmod_mat/io.c', - 'nmod_mat/is_one.c', - 'nmod_mat/is_zero.c', - 'nmod_mat/is_zero_row.c', - 'nmod_mat/lu.c', - 'nmod_mat/lu_classical.c', - 'nmod_mat/lu_classical_delayed.c', - 'nmod_mat/lu_recursive.c', - 'nmod_mat/minpoly.c', - 'nmod_mat/mul_blas.c', - 'nmod_mat/mul.c', - 'nmod_mat/mul_classical.c', - 'nmod_mat/mul_classical_threaded.c', - 'nmod_mat/mul_nmod_vec.c', - 'nmod_mat/mul_strassen.c', - 'nmod_mat/neg.c', - 'nmod_mat/nmod_vec_mul.c', - 'nmod_mat/nullspace.c', - 'nmod_mat/one.c', - 'nmod_mat/permute_rows.c', - 'nmod_mat/pow.c', - 'nmod_mat/randfull.c', - 'nmod_mat/randops.c', - 'nmod_mat/randpermdiag.c', - 'nmod_mat/randrank.c', - 'nmod_mat/randtest.c', - 'nmod_mat/randtril.c', - 'nmod_mat/randtriu.c', - 'nmod_mat/rank.c', - 'nmod_mat/reduce_row.c', - 'nmod_mat/rref.c', - 'nmod_mat/scalar.c', - 'nmod_mat/set.c', - 'nmod_mat/set_mod.c', - 'nmod_mat/similarity.c', - 'nmod_mat/solve.c', - 'nmod_mat/solve_tril.c', - 'nmod_mat/solve_triu.c', - 'nmod_mat/solve_vec.c', - 'nmod_mat/strong_echelon_form.c', - 'nmod_mat/sub.c', - 'nmod_mat/submul.c', - 'nmod_mat/swap.c', - 'nmod_mat/trace.c', - 'nmod_mat/transpose.c', - 'nmod_mat/window.c', - 'nmod_mat/zero.c', - 'nmod_mpoly/add.c', - 'nmod_mpoly/add_ui.c', - 'nmod_mpoly/cmp.c', - 'nmod_mpoly/combine_like_terms.c', - 'nmod_mpoly/compose_mat.c', - 'nmod_mpoly/compose_nmod_mpoly.c', - 'nmod_mpoly/compose_nmod_mpoly_gen.c', - 'nmod_mpoly/compose_nmod_mpoly_geobucket.c', - 'nmod_mpoly/compose_nmod_mpoly_horner.c', - 'nmod_mpoly/compose_nmod_poly.c', - 'nmod_mpoly/content_vars.c', - 'nmod_mpoly/ctx.c', - 'nmod_mpoly/deflate.c', - 'nmod_mpoly/deflation.c', - 'nmod_mpoly/degrees.c', - 'nmod_mpoly/derivative.c', - 'nmod_mpoly/discriminant.c', - 'nmod_mpoly/div.c', - 'nmod_mpoly/divides.c', - 'nmod_mpoly/divides_dense.c', - 'nmod_mpoly/divides_heap_threaded.c', - 'nmod_mpoly/divides_monagan_pearce.c', - 'nmod_mpoly/div_monagan_pearce.c', - 'nmod_mpoly/divrem.c', - 'nmod_mpoly/divrem_ideal.c', - 'nmod_mpoly/divrem_ideal_monagan_pearce.c', - 'nmod_mpoly/divrem_monagan_pearce.c', - 'nmod_mpoly/equal.c', - 'nmod_mpoly/evaluate_all.c', - 'nmod_mpoly/evaluate_one.c', - 'nmod_mpoly_factor/append.c', - 'nmod_mpoly_factor/clear.c', - 'nmod_mpoly_factor/cmp.c', - 'nmod_mpoly_factor/compression.c', - 'nmod_mpoly_factor/eval.c', - 'nmod_mpoly_factor/expand.c', - 'nmod_mpoly_factor/factor.c', - 'nmod_mpoly_factor/factor_content.c', - 'nmod_mpoly_factor/factor_squarefree.c', - 'nmod_mpoly_factor/fit_length.c', - 'nmod_mpoly_factor/gcd_zippel.c', - 'nmod_mpoly_factor/get_set.c', - 'nmod_mpoly_factor/init.c', - 'nmod_mpoly_factor/inlines.c', - 'nmod_mpoly_factor/io.c', - 'nmod_mpoly_factor/irred_lgprime.c', - 'nmod_mpoly_factor/irred_medprime.c', - 'nmod_mpoly_factor/irred_smprime_wang.c', - 'nmod_mpoly_factor/irred_smprime_zassenhaus.c', - 'nmod_mpoly_factor/irred_smprime_zippel.c', - 'nmod_mpoly_factor/lcc_wang.c', - 'nmod_mpoly_factor/mpoly_hlift.c', - 'nmod_mpoly_factor/mpoly_hlift_zippel.c', - 'nmod_mpoly_factor/mpoly_pfrac.c', - 'nmod_mpoly_factor/mpolyu.c', - 'nmod_mpoly_factor/mpolyv.c', - 'nmod_mpoly_factor/n_bpoly_mod.c', - 'nmod_mpoly_factor/n_bpoly_mod_factor_lgprime.c', - 'nmod_mpoly_factor/n_bpoly_mod_factor_smprime.c', - 'nmod_mpoly_factor/n_bpoly_mod_hlift.c', - 'nmod_mpoly_factor/n_bpoly_mod_pfrac.c', - 'nmod_mpoly_factor/nmod_mat_extras.c', - 'nmod_mpoly_factor/n_poly_vec.c', - 'nmod_mpoly_factor/polyu3_mod_hlift.c', - 'nmod_mpoly_factor/polyun.c', - 'nmod_mpoly_factor/realloc.c', - 'nmod_mpoly_factor/sort.c', - 'nmod_mpoly_factor/zip_helpers.c', - 'nmod_mpoly/fit_length.c', - 'nmod_mpoly/gcd_brown.c', - 'nmod_mpoly/gcd.c', - 'nmod_mpoly/gcd_cofactors.c', - 'nmod_mpoly/gcd_hensel.c', - 'nmod_mpoly/gcd_zippel2.c', - 'nmod_mpoly/gcd_zippel.c', - 'nmod_mpoly/gen.c', - 'nmod_mpoly/geobuckets.c', - 'nmod_mpoly/get_coeff.c', - 'nmod_mpoly/get_set_is_nmod_poly.c', - 'nmod_mpoly/get_str_pretty.c', - 'nmod_mpoly/get_term.c', - 'nmod_mpoly/get_term_coeff_ui.c', - 'nmod_mpoly/get_term_exp.c', - 'nmod_mpoly/get_term_monomial.c', - 'nmod_mpoly/get_term_ui_fmpz.c', - 'nmod_mpoly/get_term_ui_ui.c', - 'nmod_mpoly/get_term_var_exp.c', - 'nmod_mpoly/get_ui.c', - 'nmod_mpoly/inflate.c', - 'nmod_mpoly/init.c', - 'nmod_mpoly/inlines.c', - 'nmod_mpoly/interp.c', - 'nmod_mpoly/io.c', - 'nmod_mpoly/is_canonical.c', - 'nmod_mpoly/is_gen.c', - 'nmod_mpoly/is_ui.c', - 'nmod_mpoly/lead_coeff_vars.c', - 'nmod_mpoly/make_monic.c', - 'nmod_mpoly/mpolyd.c', - 'nmod_mpoly/mpolyn.c', - 'nmod_mpoly/mpolyn_divides_threaded.c', - 'nmod_mpoly/mpolyn_gcd_brown.c', - 'nmod_mpoly/mpolyu.c', - 'nmod_mpoly/mpolyu_divides.c', - 'nmod_mpoly/mpolyu_gcdp_zippel.c', - 'nmod_mpoly/mpolyun.c', - 'nmod_mpoly/mpolyun_divides.c', - 'nmod_mpoly/mul_array.c', - 'nmod_mpoly/mul_array_threaded.c', - 'nmod_mpoly/mul.c', - 'nmod_mpoly/mul_dense.c', - 'nmod_mpoly/mul_heap_threaded.c', - 'nmod_mpoly/mul_johnson.c', - 'nmod_mpoly/neg.c', - 'nmod_mpoly/pow_fmpz.c', - 'nmod_mpoly/pow_rmul.c', - 'nmod_mpoly/pow_ui.c', - 'nmod_mpoly/push_term.c', - 'nmod_mpoly/quadratic_root.c', - 'nmod_mpoly/randtest.c', - 'nmod_mpoly/realloc.c', - 'nmod_mpoly/repack_bits.c', - 'nmod_mpoly/resize.c', - 'nmod_mpoly/resultant.c', - 'nmod_mpoly/reverse.c', - 'nmod_mpoly/scalar.c', - 'nmod_mpoly/set.c', - 'nmod_mpoly/set_coeff.c', - 'nmod_mpoly/set_fmpz.c', - 'nmod_mpoly/setform.c', - 'nmod_mpoly/set_str_pretty.c', - 'nmod_mpoly/set_term_coeff_ui.c', - 'nmod_mpoly/set_term_exp.c', - 'nmod_mpoly/sort_terms.c', - 'nmod_mpoly/sqrt_heap.c', - 'nmod_mpoly/stack.c', - 'nmod_mpoly/sub.c', - 'nmod_mpoly/sub_ui.c', - 'nmod_mpoly/term_content.c', - 'nmod_mpoly/term_exp_fits.c', - 'nmod_mpoly/to_from_nmod_poly.c', - 'nmod_mpoly/univar.c', - 'nmod_mpoly/void_ring.c', - 'nmod_poly/add.c', - 'nmod_poly/add_series.c', - 'nmod_poly/add_ui.c', - 'nmod_poly/asinh_series.c', - 'nmod_poly/asin_series.c', - 'nmod_poly/atanh_series.c', - 'nmod_poly/atan_series.c', - 'nmod_poly/berlekamp_massey.c', - 'nmod_poly/bit_pack.c', - 'nmod_poly/bit_unpack.c', - 'nmod_poly/clear.c', - 'nmod_poly/compose.c', - 'nmod_poly/compose_horner.c', - 'nmod_poly/compose_mod_brent_kung.c', - 'nmod_poly/compose_mod_brent_kung_precomp_preinv.c', - 'nmod_poly/compose_mod_brent_kung_preinv.c', - 'nmod_poly/compose_mod_brent_kung_vec_preinv.c', - 'nmod_poly/compose_mod_brent_kung_vec_preinv_threaded.c', - 'nmod_poly/compose_mod.c', - 'nmod_poly/compose_mod_horner.c', - 'nmod_poly/compose_series.c', - 'nmod_poly/conway.c', - 'nmod_poly/conway_polynomial_data.c', - 'nmod_poly/cosh_series.c', - 'nmod_poly/cos_series.c', - 'nmod_poly/deflate.c', - 'nmod_poly/deflation.c', - 'nmod_poly/derivative.c', - 'nmod_poly/discriminant.c', - 'nmod_poly/div.c', - 'nmod_poly/divexact.c', - 'nmod_poly/divides.c', - 'nmod_poly/div_newton_n_preinv.c', - 'nmod_poly/divrem_basecase.c', - 'nmod_poly/divrem.c', - 'nmod_poly/divrem_newton_n_preinv.c', - 'nmod_poly/div_root.c', - 'nmod_poly/div_series.c', - 'nmod_poly/equal.c', - 'nmod_poly/equal_trunc.c', - 'nmod_poly/evaluate_mat.c', - 'nmod_poly/evaluate_nmod.c', - 'nmod_poly/evaluate_nmod_vec.c', - 'nmod_poly/exp_series.c', - 'nmod_poly_factor/clear.c', - 'nmod_poly_factor/concat.c', - 'nmod_poly_factor/factor_berlekamp.c', - 'nmod_poly_factor/factor.c', - 'nmod_poly_factor/factor_cantor_zassenhaus.c', - 'nmod_poly_factor/factor_distinct_deg.c', - 'nmod_poly_factor/factor_distinct_deg_threaded.c', - 'nmod_poly_factor/factor_equal_deg.c', - 'nmod_poly_factor/factor_equal_deg_prob.c', - 'nmod_poly_factor/factor_kaltofen_shoup.c', - 'nmod_poly_factor/factor_squarefree.c', - 'nmod_poly_factor/fit_length.c', - 'nmod_poly_factor/get_poly.c', - 'nmod_poly_factor/init.c', - 'nmod_poly_factor/inlines.c', - 'nmod_poly_factor/insert.c', - 'nmod_poly_factor/is_irreducible.c', - 'nmod_poly_factor/is_squarefree.c', - 'nmod_poly_factor/pow.c', - 'nmod_poly_factor/print.c', - 'nmod_poly_factor/realloc.c', - 'nmod_poly_factor/roots.c', - 'nmod_poly_factor/roots_factored.c', - 'nmod_poly_factor/set.c', - 'nmod_poly/find_distinct_nonzero_roots.c', - 'nmod_poly/fit_length.c', - 'nmod_poly/gcd.c', - 'nmod_poly/gcdinv.c', - 'nmod_poly/get_str.c', - 'nmod_poly/hgcd.c', - 'nmod_poly/inflate.c', - 'nmod_poly/init.c', - 'nmod_poly/inlines.c', - 'nmod_poly/integral.c', - 'nmod_poly/interpolate_nmod_vec.c', - 'nmod_poly/invmod.c', - 'nmod_poly/inv_series.c', - 'nmod_poly/inv_series_newton.c', - 'nmod_poly/invsqrt_series.c', - 'nmod_poly/io.c', - 'nmod_poly/KS2_pack.c', - 'nmod_poly/KS2_reduce.c', - 'nmod_poly/KS2_unpack.c', - 'nmod_poly/log_series.c', - 'nmod_poly/make_monic.c', - 'nmod_poly_mat/add.c', - 'nmod_poly_mat/clear.c', - 'nmod_poly_mat/concat.c', - 'nmod_poly_mat/det.c', - 'nmod_poly_mat/equal.c', - 'nmod_poly_mat/evaluate_nmod.c', - 'nmod_poly_mat/fflu.c', - 'nmod_poly_mat/find_pivot_any.c', - 'nmod_poly_mat/find_pivot_partial.c', - 'nmod_poly_mat/get_set_coeff_mat.c', - 'nmod_poly_mat/init.c', - 'nmod_poly_mat/init_set.c', - 'nmod_poly_mat/inlines.c', - 'nmod_poly_mat/inv.c', - 'nmod_poly_mat/is_one.c', - 'nmod_poly_mat/is_zero.c', - 'nmod_poly_mat/max_length.c', - 'nmod_poly_mat/mul.c', - 'nmod_poly_mat/mul_classical.c', - 'nmod_poly_mat/mul_interpolate.c', - 'nmod_poly_mat/mul_KS.c', - 'nmod_poly_mat/neg.c', - 'nmod_poly_mat/nullspace.c', - 'nmod_poly_mat/one.c', - 'nmod_poly_mat/pow.c', - 'nmod_poly_mat/print.c', - 'nmod_poly_mat/rand.c', - 'nmod_poly_mat/rank.c', - 'nmod_poly_mat/rref.c', - 'nmod_poly_mat/scalar.c', - 'nmod_poly_mat/set.c', - 'nmod_poly_mat/set_trunc.c', - 'nmod_poly_mat/shift_left_right.c', - 'nmod_poly_mat/solve.c', - 'nmod_poly_mat/solve_fflu.c', - 'nmod_poly_mat/solve_fflu_precomp.c', - 'nmod_poly_mat/sqr.c', - 'nmod_poly_mat/sub.c', - 'nmod_poly_mat/trace.c', - 'nmod_poly_mat/window.c', - 'nmod_poly_mat/zero.c', - 'nmod_poly/max_bits.c', - 'nmod_poly/mul.c', - 'nmod_poly/mul_classical.c', - 'nmod_poly/mulhigh.c', - 'nmod_poly/mulhigh_classical.c', - 'nmod_poly/mul_KS2.c', - 'nmod_poly/mul_KS4.c', - 'nmod_poly/mul_KS.c', - 'nmod_poly/mullow.c', - 'nmod_poly/mullow_classical.c', - 'nmod_poly/mullow_KS.c', - 'nmod_poly/mulmod.c', - 'nmod_poly/mulmod_preinv.c', - 'nmod_poly/multi_crt.c', - 'nmod_poly/neg.c', - 'nmod_poly/pow_binexp.c', - 'nmod_poly/pow.c', - 'nmod_poly/powers_mod.c', - 'nmod_poly/power_sums.c', - 'nmod_poly/power_sums_to_poly.c', - 'nmod_poly/powmod_binexp.c', - 'nmod_poly/powmod_binexp_preinv.c', - 'nmod_poly/powmod_x_preinv.c', - 'nmod_poly/pow_trunc.c', - 'nmod_poly/product_roots_nmod_vec.c', - 'nmod_poly/randtest.c', - 'nmod_poly/randtest_monic_primitive.c', - 'nmod_poly/realloc.c', - 'nmod_poly/rem.c', - 'nmod_poly/remove.c', - 'nmod_poly/resultant.c', - 'nmod_poly/reverse.c', - 'nmod_poly/revert_series.c', - 'nmod_poly/scalar.c', - 'nmod_poly/set_coeff_ui.c', - 'nmod_poly/set_str.c', - 'nmod_poly/set_trunc.c', - 'nmod_poly/shift_left_right.c', - 'nmod_poly/sinh_series.c', - 'nmod_poly/sin_series.c', - 'nmod_poly/sqrt.c', - 'nmod_poly/sqrt_series.c', - 'nmod_poly/sub.c', - 'nmod_poly/sub_series.c', - 'nmod_poly/sub_ui.c', - 'nmod_poly/tanh_series.c', - 'nmod_poly/tan_series.c', - 'nmod_poly/taylor_shift.c', - 'nmod_poly/tree.c', - 'nmod_poly/xgcd.c', - 'nmod_vec/add.c', - 'nmod_vec/discrete_log_pohlig_hellman.c', - 'nmod_vec/dot.c', - 'nmod_vec/inlines.c', - 'nmod_vec/io.c', - 'nmod_vec/max_bits.c', - 'nmod_vec/neg.c', - 'nmod_vec/randtest.c', - 'nmod_vec/reduce.c', - 'nmod_vec/scalar.c', - 'nmod_vec/sub.c', - 'n_poly/io.c', - 'n_poly/n_bpoly.c', - 'n_poly/n_bpoly_mod.c', - 'n_poly/n_bpoly_mod_gcd.c', - 'n_poly/n_bpoly_stack.c', - 'n_poly/n_fq_bpoly.c', - 'n_poly/n_fq_bpoly_gcd.c', - 'n_poly/n_fq_bpoly_taylor_shift.c', - 'n_poly/n_fq.c', - 'n_poly/n_fq_poly_add.c', - 'n_poly/n_fq_poly_add_si.c', - 'n_poly/n_fq_poly.c', - 'n_poly/n_fq_poly_divrem.c', - 'n_poly/n_fq_poly_gcd.c', - 'n_poly/n_fq_poly_inv_series.c', - 'n_poly/n_fq_poly_mul.c', - 'n_poly/n_fq_poly_mullow.c', - 'n_poly/n_fq_poly_mulmod.c', - 'n_poly/n_fq_poly_neg.c', - 'n_poly/n_fq_poly_pow.c', - 'n_poly/n_fq_poly_rem.c', - 'n_poly/n_fq_poly_sub.c', - 'n_poly/n_fq_polyun.c', - 'n_poly/n_fq_poly_xgcd.c', - 'n_poly/n_fq_pow_cache.c', - 'n_poly/nmod_n_fq_interp.c', - 'n_poly/nmod_pow_cache.c', - 'n_poly/n_poly.c', - 'n_poly/n_poly_mod.c', - 'n_poly/n_poly_stack.c', - 'n_poly/n_polyu1n_gcd.c', - 'n_poly/n_polyu.c', - 'n_poly/n_polyun.c', - 'n_poly/n_polyun_stack.c', - 'n_poly/n_tpoly.c', - 'n_poly/zippel_helpers.c', - 'padic/add.c', - 'padic/clear.c', - 'padic/ctx_clear.c', - 'padic/ctx_init.c', - 'padic/div.c', - 'padic/exp_balanced.c', - 'padic/exp.c', - 'padic/exp_rectangular.c', - 'padic/get_fmpq.c', - 'padic/get_fmpz.c', - 'padic/get_mpq.c', - 'padic/get_mpz.c', - 'padic/get_str.c', - 'padic/init.c', - 'padic/inlines.c', - 'padic/inv.c', - 'padic/io.c', - 'padic/lifts.c', - 'padic/log_balanced.c', - 'padic/log.c', - 'padic/log_rectangular.c', - 'padic/log_satoh.c', - 'padic_mat/add.c', - 'padic_mat/canonicalise.c', - 'padic_mat/clear.c', - 'padic_mat/equal.c', - 'padic_mat/get_entry_padic.c', - 'padic_mat/get_fmpq_mat.c', - 'padic_mat/init.c', - 'padic_mat/inlines.c', - 'padic_mat/io.c', - 'padic_mat/is_canonical.c', - 'padic_mat/is_reduced.c', - 'padic_mat/is_zero.c', - 'padic_mat/mul.c', - 'padic_mat/neg.c', - 'padic_mat/one.c', - 'padic_mat/randtest.c', - 'padic_mat/reduce.c', - 'padic_mat/scalar.c', - 'padic_mat/set.c', - 'padic_mat/set_entry_padic.c', - 'padic_mat/set_fmpq_mat.c', - 'padic_mat/sub.c', - 'padic_mat/swap.c', - 'padic_mat/transpose.c', - 'padic_mat/zero.c', - 'padic/mul.c', - 'padic/neg.c', - 'padic_poly/add.c', - 'padic_poly/canonicalise.c', - 'padic_poly/clear.c', - 'padic_poly/compose.c', - 'padic_poly/compose_pow.c', - 'padic_poly/derivative.c', - 'padic_poly/equal.c', - 'padic_poly/evaluate_padic.c', - 'padic_poly/fit_length.c', - 'padic_poly/get_coeff_padic.c', - 'padic_poly/get_fmpq_poly.c', - 'padic_poly/get_fmpz_poly.c', - 'padic_poly/init.c', - 'padic_poly/inlines.c', - 'padic_poly/inv_series.c', - 'padic_poly/io.c', - 'padic_poly/is_canonical.c', - 'padic_poly/is_reduced.c', - 'padic_poly/mul.c', - 'padic_poly/neg.c', - 'padic_poly/normalise.c', - 'padic_poly/pow.c', - 'padic_poly/randtest.c', - 'padic_poly/realloc.c', - 'padic_poly/reduce.c', - 'padic_poly/scalar_mul_padic.c', - 'padic_poly/set.c', - 'padic_poly/set_coeff_padic.c', - 'padic_poly/set_fmpq.c', - 'padic_poly/set_fmpq_poly.c', - 'padic_poly/set_fmpz.c', - 'padic_poly/set_fmpz_poly.c', - 'padic_poly/set_padic.c', - 'padic_poly/set_si.c', - 'padic_poly/set_ui.c', - 'padic_poly/shift_left.c', - 'padic_poly/shift_right.c', - 'padic_poly/sub.c', - 'padic_poly/swap.c', - 'padic/pow_si.c', - 'padic/randtest.c', - 'padic/reduce.c', - 'padic/set.c', - 'padic/set_fmpq.c', - 'padic/set_fmpz.c', - 'padic/set_mpq.c', - 'padic/set_mpz.c', - 'padic/set_si.c', - 'padic/set_ui.c', - 'padic/shift.c', - 'padic/sqrt.c', - 'padic/sub.c', - 'padic/teichmuller.c', - 'padic/val_fac.c', - 'partitions/fmpz_fmpz.c', - 'partitions/hrr_sum_arb.c', - 'partitions/leading_fmpz.c', - 'partitions/rademacher_bound.c', - 'perm/inlines.c', - 'perm/parity.c', - 'perm/randtest.c', - 'qadic/ctx_clear.c', - 'qadic/ctx_init.c', - 'qadic/exp_balanced.c', - 'qadic/exp.c', - 'qadic/exp_rectangular.c', - 'qadic/frobenius.c', - 'qadic/inlines.c', - 'qadic/inv.c', - 'qadic/io.c', - 'qadic/log_balanced.c', - 'qadic/log.c', - 'qadic/log_rectangular.c', - 'qadic/mul.c', - 'qadic/norm_analytic.c', - 'qadic/norm.c', - 'qadic/norm_resultant.c', - 'qadic/pow.c', - 'qadic/set_fmpz_poly.c', - 'qadic/sqrt.c', - 'qadic/teichmuller.c', - 'qadic/trace.c', - 'qfb/exponent.c', - 'qfb/exponent_element.c', - 'qfb/exponent_grh.c', - 'qfb/hash_clear.c', - 'qfb/hash_find.c', - 'qfb/hash_init.c', - 'qfb/hash_insert.c', - 'qfb/inlines.c', - 'qfb/io.c', - 'qfb/is_reduced.c', - 'qfb/nucomp.c', - 'qfb/nudupl.c', - 'qfb/pow.c', - 'qfb/pow_ui.c', - 'qfb/prime_form.c', - 'qfb/reduce.c', - 'qfb/reduced_forms.c', - 'qqbar/abs2.c', - 'qqbar/abs.c', - 'qqbar/acb_lindep.c', - 'qqbar/acos_pi.c', - 'qqbar/acot_pi.c', - 'qqbar/acsc_pi.c', - 'qqbar/add.c', - 'qqbar/affine_transform.c', - 'qqbar/asec_pi.c', - 'qqbar/asin_pi.c', - 'qqbar/atan_pi.c', - 'qqbar/cache_enclosure.c', - 'qqbar/ceil.c', - 'qqbar/clear.c', - 'qqbar/cmpabs.c', - 'qqbar/cmpabs_im.c', - 'qqbar/cmpabs_re.c', - 'qqbar/cmp_im.c', - 'qqbar/cmp_re.c', - 'qqbar/cmp_root_order.c', - 'qqbar/composed_op.c', - 'qqbar/conj.c', - 'qqbar/conjugates.c', - 'qqbar/cos_pi.c', - 'qqbar/cot_pi.c', - 'qqbar/csc_pi.c', - 'qqbar/csgn.c', - 'qqbar/denominator.c', - 'qqbar/div.c', - 'qqbar/eigenvalues_fmpq_mat.c', - 'qqbar/eigenvalues_fmpz_mat.c', - 'qqbar/enclosure_raw.c', - 'qqbar/equal.c', - 'qqbar/equal_fmpq_poly_val.c', - 'qqbar/evaluate_fmpq_poly.c', - 'qqbar/evaluate_fmpz_mpoly.c', - 'qqbar/evaluate_fmpz_poly.c', - 'qqbar/exp_pi_i.c', - 'qqbar/express_in_field.c', - 'qqbar/floor.c', - 'qqbar/fmpq_pow_si_ui.c', - 'qqbar/fmpq_root_ui.c', - 'qqbar/get_acb.c', - 'qqbar/get_arb.c', - 'qqbar/get_arb_im.c', - 'qqbar/get_arb_re.c', - 'qqbar/get_fexpr.c', - 'qqbar/get_fmpq.c', - 'qqbar/get_fmpz.c', - 'qqbar/get_quadratic.c', - 'qqbar/guess.c', - 'qqbar/hash.c', - 'qqbar/height_bits.c', - 'qqbar/height.c', - 'qqbar/i.c', - 'qqbar/im.c', - 'qqbar/init.c', - 'qqbar/inlines.c', - 'qqbar/inv.c', - 'qqbar/log_pi_i.c', - 'qqbar/mul_2exp_si.c', - 'qqbar/mul.c', - 'qqbar/neg.c', - 'qqbar/numerator.c', - 'qqbar/phi.c', - 'qqbar/pow.c', - 'qqbar/print.c', - 'qqbar/printn.c', - 'qqbar/randtest.c', - 'qqbar/re.c', - 'qqbar/re_im.c', - 'qqbar/root_of_unity.c', - 'qqbar/roots_fmpq_poly.c', - 'qqbar/roots_fmpz_poly.c', - 'qqbar/roots_poly_squarefree.c', - 'qqbar/root_ui.c', - 'qqbar/sec_pi.c', - 'qqbar/set.c', - 'qqbar/set_d.c', - 'qqbar/set_fexpr.c', - 'qqbar/set_fmpq.c', - 'qqbar/set_fmpz.c', - 'qqbar/set_re_im.c', - 'qqbar/set_re_im_d.c', - 'qqbar/set_si.c', - 'qqbar/set_ui.c', - 'qqbar/sgn.c', - 'qqbar/sgn_im.c', - 'qqbar/sgn_re.c', - 'qqbar/sin_pi.c', - 'qqbar/sub.c', - 'qqbar/swap.c', - 'qqbar/tan_pi.c', - 'qqbar/validate_enclosure.c', - 'qqbar/write.c', - 'qsieve/block_lanczos.c', - 'qsieve/clear.c', - 'qsieve/collect_relations.c', - 'qsieve/compute_poly_data.c', - 'qsieve/factor.c', - 'qsieve/init.c', - 'qsieve/knuth_schroeppel.c', - 'qsieve/large_prime_variant.c', - 'qsieve/linalg.c', - 'qsieve/poly.c', - 'qsieve/primes_init.c', - 'qsieve/square_root.c', - #'test/main.c', - 'thread_pool/clear.c', - 'thread_pool/distribute_work.c', - 'thread_pool/find_work.c', - 'thread_pool/get_size.c', - 'thread_pool/give_back.c', - 'thread_pool/init.c', - 'thread_pool/request.c', - 'thread_pool/restore_affinity.c', - 'thread_pool/set_affinity.c', - 'thread_pool/set_size.c', - 'thread_pool/wait.c', - 'thread_pool/wake.c', - 'thread_support/get_num_available_threads.c', - 'thread_support/thread_support.c', - 'ulong_extras/cbrt.c', - 'ulong_extras/cleanup_primes.c', - 'ulong_extras/clog.c', - 'ulong_extras/compute_primes.c', - 'ulong_extras/CRT.c', - 'ulong_extras/discrete_log_bsgs.c', - 'ulong_extras/div2_preinv.c', - 'ulong_extras/divides.c', - 'ulong_extras/divrem2_precomp.c', - 'ulong_extras/divrem2_preinv.c', - 'ulong_extras/euler_phi.c', - 'ulong_extras/factor.c', - 'ulong_extras/factor_ecm.c', - 'ulong_extras/factor_misc.c', - 'ulong_extras/factorial_fast_mod2_preinv.c', - 'ulong_extras/factorial_mod2_preinv.c', - 'ulong_extras/factor_insert.c', - 'ulong_extras/factor_lehman.c', - 'ulong_extras/factor_one_line.c', - 'ulong_extras/factor_partial.c', - 'ulong_extras/factor_pollard_brent.c', - 'ulong_extras/factor_power235.c', - 'ulong_extras/factor_pp1.c', - 'ulong_extras/factor_SQUFOF.c', - 'ulong_extras/factor_trial.c', - 'ulong_extras/flog.c', - 'ulong_extras/gcdinv.c', - 'ulong_extras/inlines.c', - 'ulong_extras/is_oddprime.c', - 'ulong_extras/is_perfect_power235.c', - 'ulong_extras/is_perfect_power.c', - 'ulong_extras/is_prime.c', - 'ulong_extras/is_probabprime.c', - 'ulong_extras/is_square.c', - 'ulong_extras/is_squarefree.c', - 'ulong_extras/is_strong_probabprime2_preinv.c', - 'ulong_extras/is_strong_probabprime_precomp.c', - 'ulong_extras/jacobi.c', - 'ulong_extras/lll_mod_preinv.c', - 'ulong_extras/ll_mod_preinv.c', - 'ulong_extras/mod2_precomp.c', - 'ulong_extras/mod2_preinv.c', - 'ulong_extras/mod_precomp.c', - 'ulong_extras/moebius_mu.c', - 'ulong_extras/mulmod_precomp.c', - 'ulong_extras/mulmod_precomp_shoup.c', - 'ulong_extras/mulmod_preinv.c', - 'ulong_extras/nextprime.c', - 'ulong_extras/nth_prime.c', - 'ulong_extras/pow.c', - 'ulong_extras/powmod2_preinv.c', - 'ulong_extras/powmod2_ui_preinv.c', - 'ulong_extras/powmod_precomp.c', - 'ulong_extras/powmod_ui_preinv.c', - 'ulong_extras/preinvert_limb.c', - 'ulong_extras/prime_inverses_arr_readonly.c', - 'ulong_extras/prime_pi_bounds.c', - 'ulong_extras/prime_pi.c', - 'ulong_extras/primes_arr_readonly.c', - 'ulong_extras/primes_clear.c', - 'ulong_extras/primes_extend_small.c', - 'ulong_extras/primes_init.c', - 'ulong_extras/primes_jump_after.c', - 'ulong_extras/primes_next.c', - 'ulong_extras/primes_sieve_range.c', - 'ulong_extras/primitive_root_prime.c', - 'ulong_extras/randomisation.c', - 'ulong_extras/remove2_precomp.c', - 'ulong_extras/remove.c', - 'ulong_extras/revbin.c', - 'ulong_extras/root.c', - 'ulong_extras/root_estimate.c', - 'ulong_extras/rootrem.c', - 'ulong_extras/sizeinbase.c', - 'ulong_extras/sqrt.c', - 'ulong_extras/sqrtmod.c', - 'ulong_extras/sqrtmodn.c', - 'ulong_extras/sqrtmod_primepow.c', - 'ulong_extras/sqrtrem.c', - 'ulong_extras/xgcd.c', -] diff --git a/src/ulong_extras/test/meson.build b/src/ulong_extras/test/meson.build deleted file mode 100644 index d9ae8dd9a1..0000000000 --- a/src/ulong_extras/test/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -test_exe = executable('main', - 'main.c', - dependencies: flint_deps, - link_with: libflint, - include_directories: src_inc, - install: false, -) -test('ulong_extras', test_exe) From 9f939be3f309be8a46239d8532a3e32673718e9d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 00:30:01 +0100 Subject: [PATCH 009/104] build: generate build for fft_small and assembly --- _meson_build/generate_meson_build.py | 176 ++++++++++++++++++++------- _meson_build/meson.build | 13 +- detection/meson.build | 88 ++------------ 3 files changed, 151 insertions(+), 126 deletions(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index a6d79513b7..d14c75f7b8 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -6,14 +6,14 @@ this_dir = dirname(abspath(__file__)) -files = [ +files_to_copy = [ 'configure', 'Makefile', 'meson.build', 'meson.options', ] -# Directories in src that are not modules to be built as part of libflint +# Directories in src that are not modules or that need special handling exclude_mod_dirs = [ 'test', 'profile', @@ -21,6 +21,10 @@ 'python', ] +conditional_modules = [ + 'fft_small', +] + # Modules that do not have a corresponding header file mod_no_header = [ 'generic_files', @@ -91,6 +95,12 @@ # python _meson_build/generate_meson_build.py # +configure_file( + input: 'flint.h.in', + output: 'flint.h', + configuration: cfg_data, +) + src_dir_inc = include_directories('.') modules = [ @@ -126,6 +136,14 @@ endif endforeach +# Add conditional modules + +if have_fft_small + subdir('fft_small') + mod_tests += ['fft_small/test'] + headers_all += ['fft_small.h'] +endif + headers_all = files(headers_all) ''' @@ -160,7 +178,70 @@ test('%s', test_exe) ''' +asm_submodule_arm64 = '''\ + +asm_deps = [ + '../../../config.m4', + '../asm-defs.m4', +] + +if host_machine.system() == 'darwin' + asm_deps += ['darwin.m4'] +else + asm_deps += ['arm64-defs.m4'] +endif + +asm_files = [ +%s +] +''' + +asm_submodule_x86_broadwell = '''\ + +asm_deps = [ + '../../../config.m4', + '../asm-defs.m4', + 'x86-defs.m4', +] + +if host_machine.system() == 'darwin' + asm_deps += ['darwin.m4'] +endif + +asm_files = [ +%s +] +''' + +asm_to_s_files = '''\ + +m4_prog = find_program('m4', native: true) + +foreach asm_file: asm_files + s_filename = fs.stem(asm_file) + '.s' + s_file = custom_target(s_filename, + input: [asm_file] + asm_deps, + output: s_filename, + command: [m4_prog, '-I..', '@INPUT0@'], + capture: true, + ) + s_files += [s_file] +endforeach +''' + + +asm_modules = [ + ('mpn_extras/arm64', asm_submodule_arm64), + ('mpn_extras/x86_64/broadwell', asm_submodule_x86_broadwell), +] + + def get_flint_modules(flint_root): + """ + Scan the src directory and return a list of all modules. + + Also check for possible mismatches between subdirs and headers. + """ src_path = join(flint_root, 'src') is_mod = lambda p: isdir(join(src_path, p)) and p not in exclude_mod_dirs subdirs = [p for p in listdir(src_path) if is_mod(p)] @@ -184,76 +265,83 @@ def get_flint_modules(flint_root): return subdirs -parser = ArgumentParser(description='Generate Meson build files') +parser = ArgumentParser(description='Generate Meson build files') parser.add_argument('-q', '--quiet', action='store_true', help='Do not print anything') parser.add_argument('--error-if-changed', action='store_true', help='Exit with error code 1 if the files have changed') parser.add_argument('output_dir', default='.', help='Output directory') + def main(args): args = parser.parse_args(args) - for fname in files: + for fname in files_to_copy: src_path = join(this_dir, fname) dst_path = join(args.output_dir, fname) - if not args.quiet: - print('Copying {} to {}'.format(src_path, dst_path)) - if args.error_if_changed: - if not same_files(src_path, dst_path): - print('File {} has changed'.format(dst)) - return 1 - copyfile(src_path, dst_path) + copy_file(src_path, dst_path, args) modules = get_flint_modules(args.output_dir) - modules_str = '\n'.join(f" '{m}'," for m in sorted(modules)) - mod_no_head_str = '\n'.join(f" '{m}'," for m in sorted(mod_no_header)) - mod_no_test_str = '\n'.join(f" '{m}'," for m in sorted(mod_no_tests)) - head_no_dir_str = '\n'.join(f" '{m}'," for m in sorted(head_no_dir)) + # We will generate the meson.build file for conditional modules but the + # main meson.build file will decide whether to include them or not. + modules_unconditional = set(modules) - set(conditional_modules) + # src/meson.build src_meson_build_text = src_meson_build % ( - modules_str, mod_no_head_str, mod_no_test_str, head_no_dir_str) - + format_lines(modules_unconditional), + format_lines(mod_no_header), + format_lines(mod_no_tests), + format_lines(head_no_dir), + ) dst_path = join(args.output_dir, 'src', 'meson.build') + write_file(dst_path, src_meson_build_text, args) - if not args.quiet: - print('Writing meson.build to {}'.format(src_path)) - if args.error_if_changed: - if not same_content(src_meson_build_text, src_path): - print('File {} has changed'.format(src_path)) - return 1 - with open(dst_path, 'w') as fout: - fout.write(src_meson_build_text) - + # src/mod/meson.build for mod in modules + mod_no_header: mod_dir = join(args.output_dir, 'src', mod) c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] - c_files_str = '\n'.join(f" '{f}'," for f in sorted(c_files)) - src_mod_meson_build_text = src_mod_meson_build % c_files_str + src_mod_meson_build_text = src_mod_meson_build % format_lines(c_files) dst_path = join(mod_dir, 'meson.build') - if not args.quiet: - print('Writing meson.build to {}'.format(dst_path)) - if args.error_if_changed: - if not same_content(src_mod_meson_build_text, dst_path): - print('File {} has changed'.format(dst_path)) - return 1 - with open(dst_path, 'w') as fout: - fout.write(src_mod_meson_build_text) + write_file(dst_path, src_mod_meson_build_text, args) + # src/mod/test/meson.build if mod not in mod_no_tests: test_dir = join(mod_dir, 'test') test_mod_meson_build_text = test_mod_meson_build % mod dst_path = join(test_dir, 'meson.build') - if not args.quiet: - print('Writing meson.build to {}'.format(dst_path)) - if args.error_if_changed: - if not same_content(test_mod_meson_build_text, dst_path): - print('File {} has changed'.format(dst_path)) - return 1 - with open(dst_path, 'w') as fout: - fout.write(test_mod_meson_build_text) + write_file(dst_path, test_mod_meson_build_text, args) + + # src/mpn_extras/*/meson.build + for path, asm_submodule in asm_modules: + asm_dir = join(args.output_dir, 'src', path) + asm_files = [f for f in listdir(asm_dir) if f.endswith('.asm')] + asm_submodule_text = asm_submodule % format_lines(asm_files) + asm_submodule_text += asm_to_s_files + dst_path = join(asm_dir, 'meson.build') + write_file(dst_path, asm_submodule_text, args) + + +def format_lines(lst): + return '\n'.join(f" '{m}'," for m in sorted(lst)) + + +def write_file(dst_path, text, args): + if not args.quiet: + print('Writing %s' % dst_path) + if args.error_if_changed: + if not same_content(text, dst_path): + print('File {} has changed'.format(dst_path)) + sys.exit(1) + with open(dst_path, 'w') as fout: + fout.write(text) + + +def copy_file(src_path, dst_path, args): + with open(src_path, 'r') as f: + src_content = f.read() + write_file(dst_path, src_content, args) def same_files(src_path, dst_path): diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 326220d250..5b292dd904 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -1,5 +1,5 @@ project('FLINT', 'c', - version: '3.1.0', + version: '3.2.0-dev', license: 'LGPL3+', default_options: [ 'buildtype=release', @@ -7,8 +7,13 @@ project('FLINT', 'c', ], ) -cc = meson.get_compiler('c') cfg_data = configuration_data() +cfg_data.set('FLINT_MAJOR', meson.project_version().split('.')[0]) +cfg_data.set('FLINT_MINOR', meson.project_version().split('.')[1]) +cfg_data.set('FLINT_PATCH', meson.project_version().split('.')[2]) +cfg_data.set('FLINT_VERSION_FULL', meson.project_version()) + +cc = meson.get_compiler('c') fs = import('fs') m_dep = cc.find_library('m', required: false) @@ -23,10 +28,12 @@ add_project_arguments( language: 'c', ) -subdir('src') subdir('detection') +subdir('src') if have_assembly + s_files = [] + subdir('src' / assembly_dir) c_files_all += s_files endif diff --git a/detection/meson.build b/detection/meson.build index 9310f76348..a08f2d03f2 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -1,7 +1,11 @@ +# ----------------------------------------------------------------------------- +# fft_small +# ----------------------------------------------------------------------------- fft_small_opt = get_option('fft_small') # check for headers used by fft_small +# XXX: Need to actually compile a test program to check for AVX support has_avx = cc.has_header('immintrin.h') has_neon = cc.has_header('arm_neon.h') @@ -22,21 +26,9 @@ if have_fft_small description: 'Define to use the fft_small module') endif -if have_fft_small - c_files_all += [ - 'src/fft_small/default_ctx.c', - 'src/fft_small/fmpz_poly_mul.c', - 'src/fft_small/mpn_helpers.c', - 'src/fft_small/mpn_mul.c', - 'src/fft_small/mulmod_statisfies_bounds.c', - 'src/fft_small/nmod_poly_mul.c', - 'src/fft_small/sd_fft.c', - 'src/fft_small/sd_fft_ctx.c', - 'src/fft_small/sd_ifft.c', - ] - # Maybe fft_small.h should only be added conditionally as well... - # headers_all += ['src/fft_small.h'] -endif +# ----------------------------------------------------------------------------- +# assembly +# ----------------------------------------------------------------------------- assembly_opt = get_option('assembly') @@ -52,11 +44,11 @@ assembly_opt = assembly_opt.require(host_machine.system() != 'windows', # those systems. if host_machine.cpu_family() == 'aarch64' assembly_cpu_supported = true - assembly_dir = 'arm64' + assembly_dir = 'mpn_extras/arm64' # FLINT_HAVE_ASSEMBLY_armv8 elif host_machine.cpu_family() == 'x86_64' assembly_cpu_supported = true - assembly_dir = 'x86_64/broadwell' + assembly_dir = 'mpn_extras/x86_64/broadwell' # FLINT_HAVE_ASSEMBLY_x86_64_adx else assembly_cpu_supported = false @@ -69,65 +61,3 @@ assembly_opt = assembly_opt.enable_auto_if(true) have_assembly = assembly_opt.enabled() message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') - -if have_assembly - - asm_deps = [ - '../config.m4', - '../src/mpn_extras/asm-defs.m4', - ] - - if assembly_dir == 'arm64' - asm_files = [ - 'src/mpn_extras/arm64/mul_2.asm', - 'src/mpn_extras/arm64/mulhigh_hard.asm', - 'src/mpn_extras/arm64/mul_hard.asm', - 'src/mpn_extras/arm64/sqrhigh_hard.asm', - 'src/mpn_extras/arm64/mulhigh_basecase.asm', - 'src/mpn_extras/arm64/sqr_hard.asm', - ] - asm_deps += [ - '../src/mpn_extras/arm64/darwin.m4', - '../src/mpn_extras/arm64/arm64-defs.m4', - ] - elif assembly_dir == 'x86_64/broadwell' - asm_files = [ - 'src/mpn_extras/x86_64/broadwell/mullow_hard.asm', - 'src/mpn_extras/x86_64/broadwell/2add_n_inplace.asm', - 'src/mpn_extras/x86_64/broadwell/mulhigh_hard.asm', - 'src/mpn_extras/x86_64/broadwell/sqrhigh_basecase_odd.asm', - 'src/mpn_extras/x86_64/broadwell/mul_hard.asm', - 'src/mpn_extras/x86_64/broadwell/mulhigh_normalised_hard.asm', - 'src/mpn_extras/x86_64/broadwell/sqrhigh_hard.asm', - 'src/mpn_extras/x86_64/broadwell/mullow_basecase.asm', - 'src/mpn_extras/x86_64/broadwell/mulhigh_basecase.asm', - 'src/mpn_extras/x86_64/broadwell/sqrhigh_basecase_even.asm', - 'src/mpn_extras/x86_64/broadwell/sqr_hard.asm', - ] - asm_deps += [ - '../src/mpn_extras/x86_64/broadwell/x86_64-defs.m4', - ] - if host_machine.system() == 'darwin' - asm_deps += [ - '../src/mpn_extras/x86_64/broadwell/darwin.m4', - ] - endif - else - error('Unknown assembly_dir: ', assembly_dir) - endif - - m4_prog = find_program('m4', native: true) - - s_files = [] - foreach asm_file: asm_files - s_filename = fs.stem(asm_file) + '.s' - s_file = custom_target(s_filename, - input: ['..' / asm_file] + asm_deps, - output: s_filename, - command: [m4_prog, '-I..', '@INPUT0@'], - capture: true, - ) - s_files += [s_file] - endforeach - -endif From 6792035a231042c4f9df6556a48d2a69ef0cb06b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 00:37:21 +0100 Subject: [PATCH 010/104] build: add dummy configure script --- _meson_build/configure | 158 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100644 _meson_build/configure diff --git a/_meson_build/configure b/_meson_build/configure new file mode 100644 index 0000000000..9e4bb23582 --- /dev/null +++ b/_meson_build/configure @@ -0,0 +1,158 @@ +#!/usr/bin/env python + +from os.path import join, abspath, dirname +import sys +import shutil +from subprocess import check_call +from argparse import ArgumentParser + + +parser = ArgumentParser(description='Configure FLINT for building with meson') + +parser.add_argument('--build-dir', default='build', help='Build directory') + +parser.add_argument('--prefix', default=None, help='Installation prefix') +parser.add_argument('--bindir', default=None, help='Binary directory') +parser.add_argument('--libdir', default=None, help='Library directory') +parser.add_argument('--includedir', default=None, help='Include directory') + +parser.add_argument('--build', default=None, help='Not supported...') +parser.add_argument('--host', default=None, help='Not supported...') + +parser.add_argument('--disable-shared', default=False, action='store_true', help='Do not build shared libraries') +parser.add_argument('--enable-static', default=False, action='store_true', help='Build static libraries') + +parser.add_argument('--disable-libtool-lock', default=None, help='Not supported...') +parser.add_argument('--enable-pthread', default=None, help='Not supported...') +parser.add_argument('--enable-reentrant', default=None, help='Not supported...') +parser.add_argument('--enable-thread-safe', default=None, help='Not supported...') +parser.add_argument('--enable-assert', default=None, help='Not supported...') +parser.add_argument('--enable-coverage', default=None, help='Not supported...') +parser.add_argument('--enable-debug', default=None, help='Not supported...') +parser.add_argument('--enable-dependency-tracking', default=None, help='Not supported...') +parser.add_argument('--enable-pretty-tests', default=None, help='Not supported...') + +parser.add_argument('--enable-gmp-internals', default=None, help='Not supported...') + +parser.add_argument('--enable-assembly', default=None, choices=['yes', 'no', 'auto'], help='Enable assembly routines (if available)') +parser.add_argument('--enable-avx2', default=None, choices=['yes', 'no', 'auto'], help='Use AVX2 instructions') +parser.add_argument('--enable-avx512', default=None, choices=['yes', 'no', 'auto'], help='Use AVX512 instructions') + +parser.add_argument('--with-gmp', default=None, help='GMP install directory') +parser.add_argument('--with-mpfr', default=None, help='MPFR install directory') + +parser.add_argument('--with-blas', default=None, help='Not supported...') +parser.add_argument('--with-gc', default=None, help='Not supported...') +parser.add_argument('--with-ntl', default=None, help='Not supported...') + + +def run_command(cmd): + print('-' * 80) + print('$', ' '.join(cmd)) + print('-' * 80) + check_call(cmd) + + +def enabled_disabled(value): + if value == 'yes': + return 'enabled' + elif value == 'no': + return 'disabled' + elif value == 'auto': + return 'auto' + else: + raise ValueError('Invalid value: ' + value) + + +def get_meson_command_from_configure_args(args): + """ + Translate e.g. + ./configure --prefix=/opt/foo --enable-assembly=no + to + meson setup build --prefix=/opt/foo -Dassembly=disabled + Raise ValueError if modifying an option is not supported. + """ + args = parser.parse_args(args) + + setup_args = [] + + if args.bindir is not None: + setup_args.append('--bindir=' + args.bindir) + if args.libdir is not None: + setup_args.append('--libdir=' + args.libdir) + if args.includedir is not None: + setup_args.append('--includedir=' + args.includedir) + if args.prefix is not None: + setup_args.append('--prefix=' + args.prefix) + + if args.enable_static and args.disable_shared: + setup_args.append('--default-library=static') + elif args.enable_static and not args.disable_shared: + setup_args.append('--default-library=both') + elif not args.enable_static and not args.disable_shared: + pass + elif not args.enable_static and args.disable_shared: + raise ValueError('Cannot use --enable-static and --disable-shared together') + + if args.disable_libtool_lock is not None: + raise ValueError('--disable-libtool-lock is not supported') + if args.enable_pthread is not None: + raise ValueError('--enable-pthread is not supported') + if args.enable_reentrant is not None: + raise ValueError('--enable-reentrant is not supported') + if args.enable_thread_safe is not None: + raise ValueError('--enable-thread-safe is not supported') + if args.enable_assert is not None: + raise ValueError('--enable-assert is not supported') + if args.enable_coverage is not None: + raise ValueError('--enable-coverage is not supported') + if args.enable_debug is not None: + raise ValueError('--enable-debug is not supported') + if args.enable_dependency_tracking is not None: + raise ValueError('--enable-dependency-tracking is not supported') + if args.enable_pretty_tests is not None: + raise ValueError('--enable-pretty-tests is not supported') + + if args.enable_gmp_internals is not None: + raise ValueError('--enable-gmp-internals is not supported') + + if args.enable_assembly is not None: + setup_args.append('-Dassembly=' + enabled_disabled(args.enable_assembly)) + + if args.enable_avx2 is not None or args.enable_avx512 is not None: + if 'enableds' in (args.enable_avx2, args.enable_avx512): + fft_small = 'enabled' + elif 'disabled' in (args.enable_avx2, args.enable_avx512): + fft_small = 'disabled' + else: + fft_small = 'auto' + setup_args.append('-Dfft_small=' + fft_small) + + if args.with_gmp is not None: + setup_args.append('--pkg-config-path=' + join(args.with_gmp, 'lib', 'pkgconfig')) + if args.with_mpfr is not None: + setup_args.append('--pkg-config-path=' + join(args.with_mpfr, 'lib', 'pkgconfig')) + + if args.with_blas is not None: + raise ValueError('--with-blas is not supported') + if args.with_gc is not None: + raise ValueError('--with-gc is not supported') + if args.with_ntl is not None: + raise ValueError('--with-ntl is not supported') + + cmd = ['meson', 'setup', args.build_dir] + setup_args + return cmd, args + + +def main(*args): + cmd, args = get_meson_command_from_configure_args(args) + # The default behaviour of ./configure is to basically wipe out the build. + # Everything is then rebuilt from scratch. We will do the same here to + # match the semantics of configure which does not preserve any settings + # from one run of configure to the next. + shutil.rmtree(args.build_dir, ignore_errors=True) + run_command(cmd) + + +if __name__ == '__main__': + sys.exit(main(*sys.argv[1:])) From 09c511bc56059fdbcf55538e953cfe12b71b7465 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 01:11:21 +0100 Subject: [PATCH 011/104] build: fix paths in meson Makefile/configure --- _meson_build/Makefile | 2 +- _meson_build/configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_meson_build/Makefile b/_meson_build/Makefile index e7f05671e9..db6fd8946a 100644 --- a/_meson_build/Makefile +++ b/_meson_build/Makefile @@ -1,4 +1,4 @@ -BUILDDIR = build2 +BUILDDIR = build.meson all: setup meson compile -C $(BUILDDIR) diff --git a/_meson_build/configure b/_meson_build/configure index 9e4bb23582..f3c9346c62 100644 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -9,7 +9,7 @@ from argparse import ArgumentParser parser = ArgumentParser(description='Configure FLINT for building with meson') -parser.add_argument('--build-dir', default='build', help='Build directory') +parser.add_argument('--build-dir', default='build.meson', help='Build directory') parser.add_argument('--prefix', default=None, help='Installation prefix') parser.add_argument('--bindir', default=None, help='Binary directory') From d311ba57f783c5963cdce21e34cb77e9f0b1875a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 01:13:51 +0100 Subject: [PATCH 012/104] fix typo --- _meson_build/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_meson_build/configure b/_meson_build/configure index f3c9346c62..77bcc6d885 100644 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -120,7 +120,7 @@ def get_meson_command_from_configure_args(args): setup_args.append('-Dassembly=' + enabled_disabled(args.enable_assembly)) if args.enable_avx2 is not None or args.enable_avx512 is not None: - if 'enableds' in (args.enable_avx2, args.enable_avx512): + if 'enabled' in (args.enable_avx2, args.enable_avx512): fft_small = 'enabled' elif 'disabled' in (args.enable_avx2, args.enable_avx512): fft_small = 'disabled' From 9a5eefe08112ddb1652fa175021c0f427db327d8 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 01:30:31 +0100 Subject: [PATCH 013/104] build: fix options in dummy configure script --- _meson_build/configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_meson_build/configure b/_meson_build/configure index 77bcc6d885..9e5c6010d2 100644 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -120,9 +120,9 @@ def get_meson_command_from_configure_args(args): setup_args.append('-Dassembly=' + enabled_disabled(args.enable_assembly)) if args.enable_avx2 is not None or args.enable_avx512 is not None: - if 'enabled' in (args.enable_avx2, args.enable_avx512): + if 'yes' in (args.enable_avx2, args.enable_avx512): fft_small = 'enabled' - elif 'disabled' in (args.enable_avx2, args.enable_avx512): + elif 'no' in (args.enable_avx2, args.enable_avx512): fft_small = 'disabled' else: fft_small = 'auto' From 2557ae100dda6c7fc4b4192cc4171e6f997d5e92 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 15:35:26 +0100 Subject: [PATCH 014/104] build: make a generated headers dir in build --- _meson_build/generate_meson_build.py | 35 ++++++++++++++-------------- _meson_build/include/meson.build | 3 +++ _meson_build/meson.build | 18 ++++++++++---- detection/meson.build | 17 ++++++++++++-- 4 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 _meson_build/include/meson.build diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index d14c75f7b8..59b83873ae 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -1,5 +1,5 @@ import sys -from os import listdir +from os import listdir, makedirs from os.path import join, dirname, abspath, isdir from shutil import copyfile from argparse import ArgumentParser @@ -11,6 +11,8 @@ 'Makefile', 'meson.build', 'meson.options', + 'include/meson.build', + 'include/flint/meson.build', ] # Directories in src that are not modules or that need special handling @@ -19,6 +21,7 @@ 'profile', 'interfaces', 'python', + 'include', ] conditional_modules = [ @@ -37,11 +40,7 @@ 'acf_types', 'arb_types', 'arf_types', - 'config', 'crt_helpers', - 'flint', - 'flint-config', - 'flint-mparam', 'fmpq_types', 'fmpz_mod_types', 'fmpz_types', @@ -49,7 +48,6 @@ 'fq_types', 'fq_zech_types', 'gettimeofday', - 'gmpcompat', 'limb_types', 'longlong', 'longlong_asm_clang', @@ -69,6 +67,14 @@ 'test_helpers', ] +headers_skip = [ + 'flint', + 'config', + 'flint-config', + 'flint-mparam', + 'gmpcompat', +] + mod_no_tests = [ 'ca_vec', 'calcium', @@ -95,14 +101,6 @@ # python _meson_build/generate_meson_build.py # -configure_file( - input: 'flint.h.in', - output: 'flint.h', - configuration: cfg_data, -) - -src_dir_inc = include_directories('.') - modules = [ %s ] @@ -171,7 +169,7 @@ 'main.c', dependencies: flint_deps, link_with: libflint, - include_directories: src_dir_inc, + include_directories: [headers_built_nodir_inc, '../..'], install: false, ) @@ -194,6 +192,8 @@ asm_files = [ %s ] + +src_dir_inc = include_directories('.') ''' asm_submodule_x86_broadwell = '''\ @@ -249,8 +249,8 @@ def get_flint_modules(flint_root): # Check for mismatches between subdirs and headers apart from the # known exceptions (exclude_mod_dirs, mod_no_header, head_no_dir) - extra_dirs = set(subdirs) - set(headers) != set(mod_no_header) - extra_headers = set(headers) - set(subdirs) != set(head_no_dir) + extra_dirs = set(subdirs) - set(headers) - set(mod_no_header) + extra_headers = set(headers) - set(subdirs) - set(head_no_dir) - set(headers_skip) if extra_dirs or extra_headers: print('Mismatch between subdirs and headers in src') print('Extra headers:\n', '\n'.join(sorted(extra_headers))) @@ -334,6 +334,7 @@ def write_file(dst_path, text, args): if not same_content(text, dst_path): print('File {} has changed'.format(dst_path)) sys.exit(1) + makedirs(dirname(dst_path), exist_ok=True) with open(dst_path, 'w') as fout: fout.write(text) diff --git a/_meson_build/include/meson.build b/_meson_build/include/meson.build new file mode 100644 index 0000000000..a670a21e97 --- /dev/null +++ b/_meson_build/include/meson.build @@ -0,0 +1,3 @@ +subdir('flint') +headers_built_inc = include_directories('.') +headers_built_nodir_inc = include_directories('flint') diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 5b292dd904..545f482697 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -7,11 +7,16 @@ project('FLINT', 'c', ], ) +FLINT_MAJOR = meson.project_version().split('.')[0] +FLINT_MINOR = meson.project_version().split('.')[1] +FLINT_PATCH = meson.project_version().split('.')[2] +FLINT_VERSION_FULL = meson.project_version() + cfg_data = configuration_data() -cfg_data.set('FLINT_MAJOR', meson.project_version().split('.')[0]) -cfg_data.set('FLINT_MINOR', meson.project_version().split('.')[1]) -cfg_data.set('FLINT_PATCH', meson.project_version().split('.')[2]) -cfg_data.set('FLINT_VERSION_FULL', meson.project_version()) +cfg_data.set('FLINT_MAJOR', FLINT_MAJOR) +cfg_data.set('FLINT_MINOR', FLINT_MINOR) +cfg_data.set('FLINT_PATCH', FLINT_PATCH) +cfg_data.set('FLINT_VERSION_FULL', FLINT_VERSION_FULL) cc = meson.get_compiler('c') fs = import('fs') @@ -37,11 +42,14 @@ if have_assembly c_files_all += s_files endif +# Build include directory after list of all source files is complete +subdir('include') + install_headers(headers_all, subdir: 'flint') libflint = library('flint', c_files_all, dependencies: flint_deps, - include_directories: include_directories('src'), + include_directories: [headers_built_nodir_inc, 'src'], install: true, c_args: [ '-DBUILDING_FLINT', diff --git a/detection/meson.build b/detection/meson.build index a08f2d03f2..770313b41b 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -45,13 +45,14 @@ assembly_opt = assembly_opt.require(host_machine.system() != 'windows', if host_machine.cpu_family() == 'aarch64' assembly_cpu_supported = true assembly_dir = 'mpn_extras/arm64' - # FLINT_HAVE_ASSEMBLY_armv8 + FLINT_HAVE_ASSEMBLY = 'armv8' elif host_machine.cpu_family() == 'x86_64' assembly_cpu_supported = true assembly_dir = 'mpn_extras/x86_64/broadwell' - # FLINT_HAVE_ASSEMBLY_x86_64_adx + FLINT_HAVE_ASSEMBLY = 'x86_64_adx' else assembly_cpu_supported = false + FLINT_HAVE_ASSEMBLY = '' endif assembly_opt = assembly_opt.require(assembly_cpu_supported, @@ -61,3 +62,15 @@ assembly_opt = assembly_opt.enable_auto_if(true) have_assembly = assembly_opt.enabled() message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') + +# ----------------------------------------------------------------------------- +# internal configuration for config.h +# ----------------------------------------------------------------------------- + +cfg_data_internal = cfg_data + +cfg_data_internal.set_quoted('LSYM_PREFIX', 'L') + +if FLINT_HAVE_ASSEMBLY != '' + cfg_data_internal.set('FLINT_HAVE_ASSEMBLY_' + FLINT_HAVE_ASSEMBLY, 1) +endif From 5973fd2a32e408cf19cdac923dd89827f95acfff Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 19:56:50 +0100 Subject: [PATCH 015/104] build: add variables to config.h and flint-config.h --- _meson_build/meson.build | 6 -- detection/meson.build | 144 ++++++++++++++++++++++++++++++++++++--- 2 files changed, 136 insertions(+), 14 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 545f482697..c7b7b15dbe 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -12,12 +12,6 @@ FLINT_MINOR = meson.project_version().split('.')[1] FLINT_PATCH = meson.project_version().split('.')[2] FLINT_VERSION_FULL = meson.project_version() -cfg_data = configuration_data() -cfg_data.set('FLINT_MAJOR', FLINT_MAJOR) -cfg_data.set('FLINT_MINOR', FLINT_MINOR) -cfg_data.set('FLINT_PATCH', FLINT_PATCH) -cfg_data.set('FLINT_VERSION_FULL', FLINT_VERSION_FULL) - cc = meson.get_compiler('c') fs = import('fs') diff --git a/detection/meson.build b/detection/meson.build index 770313b41b..7988cc23aa 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -1,3 +1,11 @@ +# ----------------------------------------------------------------------------- +# FLINT configuration +# ----------------------------------------------------------------------------- + +# Data set on cfg_data is used to generate flint_config.h +# Data set on cfg_data_internal (below) is used to generate config.h +cfg_data = configuration_data() + # ----------------------------------------------------------------------------- # fft_small # ----------------------------------------------------------------------------- @@ -21,11 +29,6 @@ have_fft_small = fft_small_opt.enabled() message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') -if have_fft_small - cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, - description: 'Define to use the fft_small module') -endif - # ----------------------------------------------------------------------------- # assembly # ----------------------------------------------------------------------------- @@ -63,14 +66,139 @@ have_assembly = assembly_opt.enabled() message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') +# ----------------------------------------------------------------------------- +# external configuration for flint_config.h +# ----------------------------------------------------------------------------- + +# cfg_data.set('FLINT_BIG_ENDIAN', 1, +# description: 'Define if system is big endian.') + +if FLINT_HAVE_ASSEMBLY == 'armv8' + cfg_data.set('FLINT_HAVE_ASSEMBLY_armv8', 1, + description: 'Define if Arm v8 assembly is available') +elif FLINT_HAVE_ASSEMBLY == 'x86_64_adx' + cfg_data.set('FLINT_HAVE_ASSEMBLY_x86_64_adx', 1, + description: 'Define if x86_64 ADX assembly is available') +endif + +if have_fft_small + cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, + description: 'Define to use the fft_small module') +endif + +cfg_data.set('FLINT_HAVE_NATIVE_mpn_add_n_sub_n', 1, + description: 'Define if GMP has mpn_add_n_sub_n') +cfg_data.set('FLINT_HAVE_NATIVE_mpn_add_nc', 1, + description: 'Define if GMP has mpn_add_nc') +cfg_data.set('FLINT_HAVE_NATIVE_mpn_addlsh1_n', 1, + description: 'Define if GMP has mpn_addlsh1_n') +# cfg_data.set('FLINT_HAVE_NATIVE_mpn_addlsh1_n_ip1', 0, +# description: 'Define if GMP has mpn_addlsh1_n_ip1') +# cfg_data.set('FLINT_HAVE_NATIVE_mpn_addmul_2', 0, +# description: 'Define if GMP has mpn_addmul_2') +# cfg_data.set('FLINT_HAVE_NATIVE_mpn_modexact_1_odd', 0, +# description: 'Define if system has mpn_modexact_1_odd') +cfg_data.set('FLINT_HAVE_NATIVE_mpn_rsh1add_n', 1, + description: 'Define if GMP has mpn_rsh1add_n') +cfg_data.set('FLINT_HAVE_NATIVE_mpn_rsh1sub_n', 1, + description: 'Define if GMP has mpn_rsh1sub_n') +cfg_data.set('FLINT_HAVE_NATIVE_mpn_sub_nc', 1, + description: 'Define if GMP has mpn_sub_nc') +# cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, +# description: 'Define if system is strongly ordered') +# cfg_data.set('FLINT_REENTRANT', 0, +# description: 'Define to enable reentrant.') +cfg_data.set('FLINT_UNROLL_LOOPS', 1, + description: 'Define to locally unroll some loops') +# cfg_data.set('FLINT_USES_BLAS', 0, +# description: 'Define to enable BLAS.') +# cfg_data.set('FLINT_USES_CPUSET', 0, +# description: 'Define if system has cpu_set_t') +# cfg_data.set('FLINT_USES_GC', 0, +# description: 'Define to enable the Boehm-Demers-Weise garbage collector.') +cfg_data.set('FLINT_USES_PTHREAD', 1, + description: 'Define to enable the use of pthread.') + +cfg_data.set('FLINT_USES_TLS', 1, + description: 'Define to enable thread-local storage.') +# cfg_data.set('FLINT_WANT_WANT_ASSERT', 1, +# description: 'Define to enable use of asserts.') +cfg_data.set('FLINT_WANT_GMP_INTERNALS', 1, + description: 'Define to enable use of GMP internals.') +cfg_data.set('FLINT_WANT_PRETTY_TESTS', 1, + description: 'Define to enable pretty printing for tests.') + # ----------------------------------------------------------------------------- # internal configuration for config.h # ----------------------------------------------------------------------------- cfg_data_internal = cfg_data -cfg_data_internal.set_quoted('LSYM_PREFIX', 'L') +#cfg_data_internal.set('AC_APPLE_UNIVERSAL_BUILD', 1) -if FLINT_HAVE_ASSEMBLY != '' - cfg_data_internal.set('FLINT_HAVE_ASSEMBLY_' + FLINT_HAVE_ASSEMBLY, 1) +# XXX: Change this when coverage options are added +#cfg_data_internal.set('FLINT_COVERAGE', 1) + +if cc.has_header_symbol('stdlib.h', 'aligned_alloc') + cfg_data_internal.set('HAVE_ALIGNED_ALLOC', 1, + description: 'Define to 1 if you have the \'aligned_alloc\' function.') endif + +ac_headers_check = [ + 'alloca.h', + 'arm_neon.h', + 'dlfcn.h', + 'errno.h', + 'fenv.h', + 'float.h', + 'immintrin.h', # XXX: has_header is not equivalent to autotools check... + 'inttypes.h', + 'malloc.h', + 'math.h', + 'pthread_np.h', + 'stdarg.h', + 'stdint.h', + 'stdio.h', + 'stdlib.h', + 'string.h', + 'strings.h', + 'sys/param.h', + 'sys/stat.h', + 'sys/types.h', + 'unistd.h', + 'windows.h', +] + +foreach h : ac_headers_check + if cc.has_header(h) + cfg_data_internal.set('HAVE_' + h.underscorify().to_upper(), 1, + description: f'Define to 1 if you have the <@h@> header file.') + endif +endforeach + +# XXX: Do we need to check for _alligned_malloc? + +cfg_data_internal.set_quoted('LSYM_PREFIX', 'L', + description: 'Assembler local label prefix') +cfg_data_internal.set_quoted('LT_OBJDIR', '.libs/', + description: 'Define to the sub-directory where libtool stores uninstalled libraries.') +cfg_data_internal.set_quoted('PACKAGE_BUGREPORT', + 'https://github.com/flintlib/flint/issues/', + description: 'Define to the address where bug reports for this package should be sent.') +cfg_data_internal.set_quoted('PACKAGE_NAME', 'FLINT', + description: 'Define to the full name of this package.') +cfg_data_internal.set_quoted('PACKAGE_STRING', 'FLINT ' + FLINT_VERSION_FULL, + description: 'Define to the full name and version of this package.') +cfg_data_internal.set_quoted('PACKAGE_TARNAME', 'flint', + description: 'Define to the one symbol short name of this package.') +cfg_data_internal.set_quoted('PACKAGE_URL', 'https://flintlib.org/', + description: 'Define to the home page for this package.') +cfg_data_internal.set_quoted('PACKAGE_VERSION', FLINT_VERSION_FULL, + description: 'Define to the version of this package.') + +cfg_data_internal.set('STDC_HEADERS', 1, + description: '''Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it.''') + +# XXX: set WORDS_BIGENDIAN or undef inline here? From 5d64f24bb24b260091cc4f3bdd400138bfc34bb0 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 21:40:32 +0100 Subject: [PATCH 016/104] build: generate all built headers in meson build --- _meson_build/include/flint/meson.build | 54 ++++++++++++++++++++++++++ detection/meson.build | 34 ++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 _meson_build/include/flint/meson.build diff --git a/_meson_build/include/flint/meson.build b/_meson_build/include/flint/meson.build new file mode 100644 index 0000000000..2515f636af --- /dev/null +++ b/_meson_build/include/flint/meson.build @@ -0,0 +1,54 @@ +flint_h = configure_file( + input: '../../src/flint.h.in', + output: 'flint.h', + configuration: { + 'FLINT_MAJOR': FLINT_MAJOR, + 'FLINT_MINOR': FLINT_MINOR, + 'FLINT_PATCH': FLINT_PATCH, + 'FLINT_VERSION_FULL': FLINT_VERSION_FULL, + } +) + +flint_config_h = configure_file( + output: 'flint-config.h', + configuration: cfg_data, +) + +config_h = configure_file( + output: 'config.h', + configuration: cfg_data_internal, +) + +if gmp_long_long_limb + gmpcompat_h_in = 'gmpcompat-longlong.h.in' +else + gmpcompat_h_in = 'gmpcompat.h.in' +endif + +gmpcompat_h = configure_file( + input: '../../src' / gmpcompat_h_in, + output: 'gmpcompat.h', + copy: true, +) + +flint_mparam_h_in = '../../src/mpn_extras' / flint_mparam / 'flint-mparam.h' + +flint_mparam_h = configure_file( + input: flint_mparam_h_in, + output: 'flint-mparam.h', + copy: true, +) + +# Copy all the other headers to the build directory so you can do +# gcc -Ibuild-dir/include ... +foreach h: headers_all + fs.copyfile(h) +endforeach + +headers_all += [ + flint_h, + flint_config_h, + config_h, + gmpcompat_h, + flint_mparam_h, +] diff --git a/detection/meson.build b/detection/meson.build index 7988cc23aa..b36170be23 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -6,6 +6,17 @@ # Data set on cfg_data_internal (below) is used to generate config.h cfg_data = configuration_data() +# ----------------------------------------------------------------------------- +# GMP +# ----------------------------------------------------------------------------- + +gmp_long_long_limb = cc.compiles(''' +#include +#if !defined(_LONG_LONG_LIMB) +# error mp_limb_t != unsigned long long int +#endif +''') + # ----------------------------------------------------------------------------- # fft_small # ----------------------------------------------------------------------------- @@ -29,6 +40,29 @@ have_fft_small = fft_small_opt.enabled() message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') +# ----------------------------------------------------------------------------- +# mparam +# ----------------------------------------------------------------------------- + +flint_mparam = 'generic' + +if host_machine.system() != 'windows' + if host_machine.cpu_family() == 'aarch64' + if host_machine.system() == 'darwin' + flint_mparam = 'arm64/applem1' + else + flint_mparam = 'arm64' + endif + elif host_machine.cpu_family() == 'x86_64' + # XXX: Need better CPU detection + if have_assembly + flint_mparam = 'x86_64/broadwell' + else + flint_mparam = 'generic' + endif + endif +endif + # ----------------------------------------------------------------------------- # assembly # ----------------------------------------------------------------------------- From 9482862c448b1712c81505c801fa2a290ea3d462 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 22:35:04 +0100 Subject: [PATCH 017/104] build: generate fmpz.c and config.m4 in meson build --- .gitignore | 1 + _meson_build/generate_meson_build.py | 12 +++++++---- _meson_build/meson.build | 7 +++++++ _meson_build/meson.options | 6 ++++++ detection/meson.build | 31 ++++++++++++++++++++++++++-- 5 files changed, 51 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 846ed9711e..ce3183f3d2 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,7 @@ libtool flint.pc autom4te.cache/ config.m4 +config.m4.in src/flint-mparam.h .gdb_history vgcore.* diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 59b83873ae..edd78c72fa 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -13,6 +13,7 @@ 'meson.options', 'include/meson.build', 'include/flint/meson.build', + 'config.m4.in', ] # Directories in src that are not modules or that need special handling @@ -121,6 +122,9 @@ c_files_all = [] mod_tests = [] +# Select the right version of fmpz.c (see configuration) +c_files_all += files('fmpz/link' / fmpz_c_in) + foreach mod : modules subdir(mod) if mod not in modules_no_tests @@ -179,7 +183,6 @@ asm_submodule_arm64 = '''\ asm_deps = [ - '../../../config.m4', '../asm-defs.m4', ] @@ -199,7 +202,6 @@ asm_submodule_x86_broadwell = '''\ asm_deps = [ - '../../../config.m4', '../asm-defs.m4', 'x86-defs.m4', ] @@ -220,9 +222,9 @@ foreach asm_file: asm_files s_filename = fs.stem(asm_file) + '.s' s_file = custom_target(s_filename, - input: [asm_file] + asm_deps, + input: [asm_file, config_m4] + asm_deps, output: s_filename, - command: [m4_prog, '-I..', '@INPUT0@'], + command: [m4_prog, '@INPUT0@'], capture: true, ) s_files += [s_file] @@ -302,6 +304,8 @@ def main(args): for mod in modules + mod_no_header: mod_dir = join(args.output_dir, 'src', mod) c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] + if mod == 'fmpz': + c_files = [f for f in c_files if f != 'fmpz.c'] src_mod_meson_build_text = src_mod_meson_build % format_lines(c_files) dst_path = join(mod_dir, 'meson.build') write_file(dst_path, src_mod_meson_build_text, args) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index c7b7b15dbe..96a32fffc2 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -31,6 +31,13 @@ subdir('detection') subdir('src') if have_assembly + # Generate config.m4 with assembly language configuration + config_m4 = configure_file( + input: 'config.m4.in', + output: 'config.m4', + configuration: {'LSYM_PREFIX': LSYM_PREFIX}, + ) + s_files = [] subdir('src' / assembly_dir) c_files_all += s_files diff --git a/_meson_build/meson.options b/_meson_build/meson.options index 64a30b276c..b98e07e85a 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -4,3 +4,9 @@ option('fft_small', type : 'feature', value : 'auto', description: 'Build the fft_small module') option('assembly', type : 'feature', value : 'auto', description: 'Use assembly code') +option('gc', type : 'feature', value : 'disabled', + description: 'Use the Boehm garbage collector') +option('reentrant', type : 'feature', value : 'disabled', + description: 'Build the reentrant module') +option('threadsafe', type : 'feature', value : 'enabled', + description: 'Build the threadsafe module') diff --git a/detection/meson.build b/detection/meson.build index b36170be23..6a0bc68a32 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -2,10 +2,32 @@ # FLINT configuration # ----------------------------------------------------------------------------- -# Data set on cfg_data is used to generate flint_config.h -# Data set on cfg_data_internal (below) is used to generate config.h +# Data set on cfg_data is used to generate flint-config.h +# Data set on cfg_data_internal (below) is also used to generate config.h cfg_data = configuration_data() +# ----------------------------------------------------------------------------- +# fmpz memory management +# ----------------------------------------------------------------------------- + +enable_gc = get_option('gc').enabled() +enable_reentrant = get_option('reentrant').enabled() +enable_thread_safe = get_option('threadsafe').enabled() + +if enable_gc + if enable_thread_safe + error('Garbage collection is not thread safe') + else + fmpz_c_in = 'fmpz_gc.c' + endif +else + if enable_reentrant + fmpz_c_in = 'fmpz_reentrant.c' + else + fmpz_c_in = 'fmpz_single.c' + endif +endif + # ----------------------------------------------------------------------------- # GMP # ----------------------------------------------------------------------------- @@ -100,6 +122,11 @@ have_assembly = assembly_opt.enabled() message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') +# XXX: Need better detection of ASM language support +if have_assembly + LSYM_PREFIX = 'L' +endif + # ----------------------------------------------------------------------------- # external configuration for flint_config.h # ----------------------------------------------------------------------------- From 982c2ce52ac02ec6c2e23df757301dcd16e8cf44 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sun, 14 Apr 2024 22:38:22 +0100 Subject: [PATCH 018/104] build: add config.m4.in --- _meson_build/config.m4.in | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 _meson_build/config.m4.in diff --git a/_meson_build/config.m4.in b/_meson_build/config.m4.in new file mode 100644 index 0000000000..2a36c4c373 --- /dev/null +++ b/_meson_build/config.m4.in @@ -0,0 +1,21 @@ +dnl config.m4. Generated automatically by configure. +changequote(<,>) +ifdef(<__CONFIG_M4_INCLUDED__>,,< +define(, <.text>) +define(, <.data>) +define(, <:>) +define(, <.globl>) +define(, <>) +define(, <_>) +define(, < .section __TEXT,__const>) +define(, <>) +define(, <>) +define(, @LSYM_PREFIX@) +define(,) +>) +changequote(`,') +ifdef(`__CONFIG_M4_INCLUDED__',,` +include(`../src/mpn_extras/asm-defs.m4') +include(`../src/mpn_extras/arm64/darwin.m4') +') +define(`__CONFIG_M4_INCLUDED__') From 0b2ac4f3f72de359ed9feb936f5161be4851e385 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 15 Apr 2024 12:45:33 +0100 Subject: [PATCH 019/104] build: add gmp_internals option to meson build --- _meson_build/meson.options | 2 + detection/meson.build | 138 +++++++++++++++++++++++++++++++------ 2 files changed, 120 insertions(+), 20 deletions(-) diff --git a/_meson_build/meson.options b/_meson_build/meson.options index b98e07e85a..cded6689ba 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -10,3 +10,5 @@ option('reentrant', type : 'feature', value : 'disabled', description: 'Build the reentrant module') option('threadsafe', type : 'feature', value : 'enabled', description: 'Build the threadsafe module') +option('gmp_internals', type : 'feature', value : 'auto', + description: 'Use GMP internals') diff --git a/detection/meson.build b/detection/meson.build index 6a0bc68a32..03d889369c 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -6,6 +6,12 @@ # Data set on cfg_data_internal (below) is also used to generate config.h cfg_data = configuration_data() +# ----------------------------------------------------------------------------- +# Project options +# ----------------------------------------------------------------------------- + +gmp_internals_opt = get_option('gmp_internals') + # ----------------------------------------------------------------------------- # fmpz memory management # ----------------------------------------------------------------------------- @@ -28,6 +34,14 @@ else endif endif +# ----------------------------------------------------------------------------- +# libm +# ----------------------------------------------------------------------------- + +if not cc.has_function('atan2', dependencies: m_dep) + error('libm is required') +endif + # ----------------------------------------------------------------------------- # GMP # ----------------------------------------------------------------------------- @@ -39,6 +53,104 @@ gmp_long_long_limb = cc.compiles(''' #endif ''') +# We need to check with cc.links rather than cc.has_function etc because we +# are checking if we can link symbols not in the headers. + +gmp_test_code = ''' +#include + +@0@ + +int main() { + @1@ + return 0; +} +''' + +gmp_base_tests = { + 'mpz_init': ['', 'mpz_t x; __gmpz_init(x);'], + 'mpn_mul_basecase': [ + 'void __gmpn_mul_basecase(mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t);', + 'mp_limb_t a[2], b[2], p[4]; __gmpn_mul_basecase(p, a, (mp_size_t) 1, b, (mp_size_t) 1);', + ], +} + +foreach name, snippets : gmp_base_tests + _code = gmp_test_code.format(snippets[0], snippets[1]) + if not cc.links(_code, dependencies: gmp_dep, name: name + ' links') + message('This code did not link with -lgmp: ', _code) + error('GMP does not have ' + name) + endif +endforeach + +if gmp_internals_opt.allowed() + + gmp_internals_required = { + 'mpn_gcd_11': ['', 'mp_limb_t res, a=0, b=0; res = __gmpn_gcd_11(a, b);'], + 'mpn_div_q': [ + 'void __gmpn_div_q(mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr);', + 'mp_limb_t q[2], n[2], d[2], t[2]; __gmpn_div_q(q, t, (mp_size_t) 1, n, (mp_size_t) 1, d);' + ], + } + + foreach name, snippets : gmp_internals_required + _code = gmp_test_code.format(snippets[0], snippets[1]) + if not cc.links(_code, dependencies: gmp_dep, name: name + ' links') + message('This code did not link with -lgmp: ', _code) + # Maybe disable gmp_internals rather than error? + error('GMP does not have ' + name) + endif + endforeach + + gmp_internals_optional = { + 'mpn_add_n_sub_n': [ + 'void __gmpn_add_n_sub_n(mp_ptr, mp_ptr, mp_ptr, mp_size_t);', + 'mp_limb_t a[2], b[2], c[2], d[2]; __gmpn_add_n_sub_n(a, b, c, (mp_size_t) 1);', + ], + 'mpn_add_nc': [ + 'mp_limb_t __gmpn_add_nc(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_add_nc(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_addlsh1_n': [ + 'mp_limb_t __gmpn_addlsh1_n(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_addlsh1_n(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_addlsh1_n_ip1': [ + 'mp_limb_t __gmpn_addlsh1_n_ip1(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_addlsh1_n_ip1(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_addmul_2': [ + 'void __gmpn_addmul_2(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_addmul_2(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_modexact_1_odd': [ + 'mp_limb_t __gmpn_modexact_1_odd(mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2]; __gmpn_modexact_1_odd(a, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_rsh1add_n': [ + 'mp_limb_t __gmpn_rsh1add_n(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_rsh1add_n(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_rsh1sub_n': [ + 'mp_limb_t __gmpn_rsh1sub_n(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_rsh1sub_n(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + 'mpn_sub_nc': [ + 'mp_limb_t __gmpn_sub_nc(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', + 'mp_limb_t a[2], b[2]; __gmpn_sub_nc(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + ], + } + + foreach name, snippets : gmp_internals_optional + _code = gmp_test_code.format(snippets[0], snippets[1]) + if cc.links(_code, dependencies: gmp_dep, name: name + ' links') + cfg_data.set('FLINT_HAVE_NATIVE_' + name, 1, + description: 'Define if GMP has ' + name) + endif + endforeach + +endif + # ----------------------------------------------------------------------------- # fft_small # ----------------------------------------------------------------------------- @@ -147,24 +259,6 @@ if have_fft_small description: 'Define to use the fft_small module') endif -cfg_data.set('FLINT_HAVE_NATIVE_mpn_add_n_sub_n', 1, - description: 'Define if GMP has mpn_add_n_sub_n') -cfg_data.set('FLINT_HAVE_NATIVE_mpn_add_nc', 1, - description: 'Define if GMP has mpn_add_nc') -cfg_data.set('FLINT_HAVE_NATIVE_mpn_addlsh1_n', 1, - description: 'Define if GMP has mpn_addlsh1_n') -# cfg_data.set('FLINT_HAVE_NATIVE_mpn_addlsh1_n_ip1', 0, -# description: 'Define if GMP has mpn_addlsh1_n_ip1') -# cfg_data.set('FLINT_HAVE_NATIVE_mpn_addmul_2', 0, -# description: 'Define if GMP has mpn_addmul_2') -# cfg_data.set('FLINT_HAVE_NATIVE_mpn_modexact_1_odd', 0, -# description: 'Define if system has mpn_modexact_1_odd') -cfg_data.set('FLINT_HAVE_NATIVE_mpn_rsh1add_n', 1, - description: 'Define if GMP has mpn_rsh1add_n') -cfg_data.set('FLINT_HAVE_NATIVE_mpn_rsh1sub_n', 1, - description: 'Define if GMP has mpn_rsh1sub_n') -cfg_data.set('FLINT_HAVE_NATIVE_mpn_sub_nc', 1, - description: 'Define if GMP has mpn_sub_nc') # cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, # description: 'Define if system is strongly ordered') # cfg_data.set('FLINT_REENTRANT', 0, @@ -184,8 +278,12 @@ cfg_data.set('FLINT_USES_TLS', 1, description: 'Define to enable thread-local storage.') # cfg_data.set('FLINT_WANT_WANT_ASSERT', 1, # description: 'Define to enable use of asserts.') -cfg_data.set('FLINT_WANT_GMP_INTERNALS', 1, - description: 'Define to enable use of GMP internals.') + +if gmp_internals_opt.allowed() + cfg_data.set('FLINT_WANT_GMP_INTERNALS', 1, + description: 'Define to enable use of GMP internals.') +endif + cfg_data.set('FLINT_WANT_PRETTY_TESTS', 1, description: 'Define to enable pretty printing for tests.') From 009b588637d9200b965612c842f44213f74ce54f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 15 Apr 2024 12:47:19 +0100 Subject: [PATCH 020/104] move mparam check after assembly --- detection/meson.build | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/detection/meson.build b/detection/meson.build index 03d889369c..6ea30327db 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -174,29 +174,6 @@ have_fft_small = fft_small_opt.enabled() message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') -# ----------------------------------------------------------------------------- -# mparam -# ----------------------------------------------------------------------------- - -flint_mparam = 'generic' - -if host_machine.system() != 'windows' - if host_machine.cpu_family() == 'aarch64' - if host_machine.system() == 'darwin' - flint_mparam = 'arm64/applem1' - else - flint_mparam = 'arm64' - endif - elif host_machine.cpu_family() == 'x86_64' - # XXX: Need better CPU detection - if have_assembly - flint_mparam = 'x86_64/broadwell' - else - flint_mparam = 'generic' - endif - endif -endif - # ----------------------------------------------------------------------------- # assembly # ----------------------------------------------------------------------------- @@ -239,6 +216,29 @@ if have_assembly LSYM_PREFIX = 'L' endif +# ----------------------------------------------------------------------------- +# mparam +# ----------------------------------------------------------------------------- + +flint_mparam = 'generic' + +if host_machine.system() != 'windows' + if host_machine.cpu_family() == 'aarch64' + if host_machine.system() == 'darwin' + flint_mparam = 'arm64/applem1' + else + flint_mparam = 'arm64' + endif + elif host_machine.cpu_family() == 'x86_64' + # XXX: Need better CPU detection + if have_assembly + flint_mparam = 'x86_64/broadwell' + else + flint_mparam = 'generic' + endif + endif +endif + # ----------------------------------------------------------------------------- # external configuration for flint_config.h # ----------------------------------------------------------------------------- From 712e9b8f1f01a09c008e3023c832d4a4c4bac3d9 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 15 Apr 2024 13:18:20 +0100 Subject: [PATCH 021/104] don't compile assembly if option disabled --- detection/meson.build | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/detection/meson.build b/detection/meson.build index 6ea30327db..98596a13d3 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -116,8 +116,8 @@ if gmp_internals_opt.allowed() 'mp_limb_t a[2], b[2]; __gmpn_addlsh1_n(a, b, (mp_size_t) 1, (mp_limb_t) 0);', ], 'mpn_addlsh1_n_ip1': [ - 'mp_limb_t __gmpn_addlsh1_n_ip1(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', - 'mp_limb_t a[2], b[2]; __gmpn_addlsh1_n_ip1(a, b, (mp_size_t) 1, (mp_limb_t) 0);', + 'mp_limb_t __gmpn_addlsh1_n_ip1(mp_ptr, mp_srcptr, mp_size_t);', + 'mp_limb_t a[2], b[2]; __gmpn_addlsh1_n_ip1(a, b, (mp_size_t) 1);', ], 'mpn_addmul_2': [ 'void __gmpn_addmul_2(mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);', @@ -246,10 +246,10 @@ endif # cfg_data.set('FLINT_BIG_ENDIAN', 1, # description: 'Define if system is big endian.') -if FLINT_HAVE_ASSEMBLY == 'armv8' +if have_assembly and FLINT_HAVE_ASSEMBLY == 'armv8' cfg_data.set('FLINT_HAVE_ASSEMBLY_armv8', 1, description: 'Define if Arm v8 assembly is available') -elif FLINT_HAVE_ASSEMBLY == 'x86_64_adx' +elif have_assembly and FLINT_HAVE_ASSEMBLY == 'x86_64_adx' cfg_data.set('FLINT_HAVE_ASSEMBLY_x86_64_adx', 1, description: 'Define if x86_64 ADX assembly is available') endif From d55615bb9ecfbb788655406aa6b681536fe291d9 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 15 Apr 2024 17:27:38 +0100 Subject: [PATCH 022/104] build: add pthread and tls options --- _meson_build/configure | 12 ++++---- _meson_build/generate_meson_build.py | 45 +++++++++++++++------------- _meson_build/meson.options | 4 ++- detection/meson.build | 21 ++++++++----- 4 files changed, 48 insertions(+), 34 deletions(-) mode change 100644 => 100755 _meson_build/configure diff --git a/_meson_build/configure b/_meson_build/configure old mode 100644 new mode 100755 index 9e5c6010d2..4035c2f9d9 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -23,16 +23,16 @@ parser.add_argument('--disable-shared', default=False, action='store_true', help parser.add_argument('--enable-static', default=False, action='store_true', help='Build static libraries') parser.add_argument('--disable-libtool-lock', default=None, help='Not supported...') -parser.add_argument('--enable-pthread', default=None, help='Not supported...') +parser.add_argument('--enable-pthread', default=None, help='Enable pthread support') parser.add_argument('--enable-reentrant', default=None, help='Not supported...') -parser.add_argument('--enable-thread-safe', default=None, help='Not supported...') +parser.add_argument('--enable-thread-safe', default=None, help='Make the library thread-safe') parser.add_argument('--enable-assert', default=None, help='Not supported...') parser.add_argument('--enable-coverage', default=None, help='Not supported...') parser.add_argument('--enable-debug', default=None, help='Not supported...') parser.add_argument('--enable-dependency-tracking', default=None, help='Not supported...') parser.add_argument('--enable-pretty-tests', default=None, help='Not supported...') -parser.add_argument('--enable-gmp-internals', default=None, help='Not supported...') +parser.add_argument('--enable-gmp-internals', default=None, help='Use GMP internals') parser.add_argument('--enable-assembly', default=None, choices=['yes', 'no', 'auto'], help='Enable assembly routines (if available)') parser.add_argument('--enable-avx2', default=None, choices=['yes', 'no', 'auto'], help='Use AVX2 instructions') @@ -97,11 +97,11 @@ def get_meson_command_from_configure_args(args): if args.disable_libtool_lock is not None: raise ValueError('--disable-libtool-lock is not supported') if args.enable_pthread is not None: - raise ValueError('--enable-pthread is not supported') + setup_args.append('-Dpthread=' + enabled_disabled(args.enable_pthread)) if args.enable_reentrant is not None: raise ValueError('--enable-reentrant is not supported') if args.enable_thread_safe is not None: - raise ValueError('--enable-thread-safe is not supported') + setup_args.append('-Dthread_safe=' + enabled_disabled(args.enable_thread_safe)) if args.enable_assert is not None: raise ValueError('--enable-assert is not supported') if args.enable_coverage is not None: @@ -114,7 +114,7 @@ def get_meson_command_from_configure_args(args): raise ValueError('--enable-pretty-tests is not supported') if args.enable_gmp_internals is not None: - raise ValueError('--enable-gmp-internals is not supported') + setup_args.append('-Dgmp_internals=' + enabled_disabled(args.enable_gmp_internals)) if args.enable_assembly is not None: setup_args.append('-Dassembly=' + enabled_disabled(args.enable_assembly)) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index edd78c72fa..2e1805eb5b 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -202,8 +202,8 @@ asm_submodule_x86_broadwell = '''\ asm_deps = [ - '../asm-defs.m4', - 'x86-defs.m4', + '../../asm-defs.m4', + '../x86_64-defs.m4', ] if host_machine.system() == 'darwin' @@ -271,8 +271,8 @@ def get_flint_modules(flint_root): parser = ArgumentParser(description='Generate Meson build files') parser.add_argument('-q', '--quiet', action='store_true', help='Do not print anything') -parser.add_argument('--error-if-changed', action='store_true', - help='Exit with error code 1 if the files have changed') +parser.add_argument('-v', '--verbose', action='store_true', + help='Show all steps') parser.add_argument('output_dir', default='.', help='Output directory') @@ -282,7 +282,9 @@ def main(args): for fname in files_to_copy: src_path = join(this_dir, fname) dst_path = join(args.output_dir, fname) - copy_file(src_path, dst_path, args) + if not args.quiet: + print('Copying %s to %s' % (src_path, dst_path)) + copy_file(src_path, dst_path) modules = get_flint_modules(args.output_dir) @@ -298,8 +300,12 @@ def main(args): format_lines(head_no_dir), ) dst_path = join(args.output_dir, 'src', 'meson.build') - write_file(dst_path, src_meson_build_text, args) + if not args.quiet: + print('Writing %s' % dst_path) + write_file(dst_path, src_meson_build_text) + if not args.quiet: + print('Making meson.build files in all modules') # src/mod/meson.build for mod in modules + mod_no_header: mod_dir = join(args.output_dir, 'src', mod) @@ -308,14 +314,18 @@ def main(args): c_files = [f for f in c_files if f != 'fmpz.c'] src_mod_meson_build_text = src_mod_meson_build % format_lines(c_files) dst_path = join(mod_dir, 'meson.build') - write_file(dst_path, src_mod_meson_build_text, args) + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, src_mod_meson_build_text) # src/mod/test/meson.build if mod not in mod_no_tests: test_dir = join(mod_dir, 'test') test_mod_meson_build_text = test_mod_meson_build % mod dst_path = join(test_dir, 'meson.build') - write_file(dst_path, test_mod_meson_build_text, args) + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, test_mod_meson_build_text) # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: @@ -324,29 +334,24 @@ def main(args): asm_submodule_text = asm_submodule % format_lines(asm_files) asm_submodule_text += asm_to_s_files dst_path = join(asm_dir, 'meson.build') - write_file(dst_path, asm_submodule_text, args) + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, asm_submodule_text) def format_lines(lst): return '\n'.join(f" '{m}'," for m in sorted(lst)) -def write_file(dst_path, text, args): - if not args.quiet: - print('Writing %s' % dst_path) - if args.error_if_changed: - if not same_content(text, dst_path): - print('File {} has changed'.format(dst_path)) - sys.exit(1) +def write_file(dst_path, text): makedirs(dirname(dst_path), exist_ok=True) with open(dst_path, 'w') as fout: fout.write(text) -def copy_file(src_path, dst_path, args): - with open(src_path, 'r') as f: - src_content = f.read() - write_file(dst_path, src_content, args) +def copy_file(src_path, dst_path): + makedirs(dirname(dst_path), exist_ok=True) + copyfile(src_path, dst_path) def same_files(src_path, dst_path): diff --git a/_meson_build/meson.options b/_meson_build/meson.options index cded6689ba..d5dc9d2d32 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -6,9 +6,11 @@ option('assembly', type : 'feature', value : 'auto', description: 'Use assembly code') option('gc', type : 'feature', value : 'disabled', description: 'Use the Boehm garbage collector') +option('pthread', type : 'feature', value : 'auto', + description: 'Use pthread') option('reentrant', type : 'feature', value : 'disabled', description: 'Build the reentrant module') -option('threadsafe', type : 'feature', value : 'enabled', +option('thread_safe', type : 'feature', value : 'enabled', description: 'Build the threadsafe module') option('gmp_internals', type : 'feature', value : 'auto', description: 'Use GMP internals') diff --git a/detection/meson.build b/detection/meson.build index 98596a13d3..92414e0a62 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -11,6 +11,7 @@ cfg_data = configuration_data() # ----------------------------------------------------------------------------- gmp_internals_opt = get_option('gmp_internals') +pthread_opt = get_option('pthread') # ----------------------------------------------------------------------------- # fmpz memory management @@ -18,7 +19,7 @@ gmp_internals_opt = get_option('gmp_internals') enable_gc = get_option('gc').enabled() enable_reentrant = get_option('reentrant').enabled() -enable_thread_safe = get_option('threadsafe').enabled() +enable_thread_safe = get_option('thread_safe').enabled() if enable_gc if enable_thread_safe @@ -255,8 +256,8 @@ elif have_assembly and FLINT_HAVE_ASSEMBLY == 'x86_64_adx' endif if have_fft_small - cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, - description: 'Define to use the fft_small module') + cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, + description: 'Define to use the fft_small module') endif # cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, @@ -271,11 +272,17 @@ cfg_data.set('FLINT_UNROLL_LOOPS', 1, # description: 'Define if system has cpu_set_t') # cfg_data.set('FLINT_USES_GC', 0, # description: 'Define to enable the Boehm-Demers-Weise garbage collector.') -cfg_data.set('FLINT_USES_PTHREAD', 1, - description: 'Define to enable the use of pthread.') -cfg_data.set('FLINT_USES_TLS', 1, - description: 'Define to enable thread-local storage.') +if pthread_opt.allowed() + cfg_data.set('FLINT_USES_PTHREAD', 1, + description: 'Define to enable the use of pthread.') +endif + +if enable_thread_safe + cfg_data.set('FLINT_USES_TLS', 1, + description: 'Define to enable thread-local storage.') +endif + # cfg_data.set('FLINT_WANT_WANT_ASSERT', 1, # description: 'Define to enable use of asserts.') From af7a6c2c074611f1aae3f7ce19c526afc488d10c Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Apr 2024 10:27:14 +0100 Subject: [PATCH 023/104] build: add most options to meson build --- _meson_build/Makefile | 8 ++ _meson_build/configure | 198 +++++++++++++++++++++++-------------- _meson_build/meson.options | 36 +++++-- detection/meson.build | 113 ++++++++++++++++----- 4 files changed, 248 insertions(+), 107 deletions(-) diff --git a/_meson_build/Makefile b/_meson_build/Makefile index db6fd8946a..bba723902f 100644 --- a/_meson_build/Makefile +++ b/_meson_build/Makefile @@ -18,3 +18,11 @@ install: compile test: setup meson configure $(BUILDDIR) -Dtests=enabled meson test -C $(BUILDDIR) + +coverage: setup + # Coverage tool e.g. gcovr needs to be installed *before* meson configure: + # pip install gcovr + meson configure $(BUILDDIR) -Dtests=enabled -Db_coverage=true + meson test -C $(BUILDDIR) + cd $(BUILDDIR) && ninja coverage-html + # open $(BUILDDIR)/meson-logs/coveragereport/index.html diff --git a/_meson_build/configure b/_meson_build/configure index 4035c2f9d9..a0c82952bc 100755 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -7,6 +7,52 @@ from subprocess import check_call from argparse import ArgumentParser +def enable_disable_to_do(args, feature): + """Translate --enable-foo=no etc to foo=True/False/None""" + enable = getattr(args, 'enable_' + feature) + disable = getattr(args, 'disable_' + feature) + if enable is not None and disable is not None: + msg = 'Cannot use --enable-{} and --disable-{} together' + raise ValueError(msg.format(feature, feature)) + if enable is not None: + return enable == 'yes' + if disable is not None: + return disable == 'no' + return None + + +def run_command(cmd): + print('-' * 80) + print('$', ' '.join(cmd)) + print('-' * 80) + check_call(cmd) + + +def enabled_disabled(value): + if value is True: + return 'enabled' + elif value is False: + return 'disabled' + else: + raise ValueError('Invalid value: ' + value) + + +def true_false(value): + if value is True: + return 'true' + elif value is False: + return 'false' + else: + raise ValueError('Invalid value: ' + str(value)) + + +def add_feature_option(parser, feature): + parser.add_argument('--enable-' + feature, help='Enable ' + feature, + choices=['yes', 'no', 'auto'], nargs='?', const='yes', action='store') + parser.add_argument('--disable-' + feature, help='Disable ' + feature, + choices=['yes', 'no', 'auto'], nargs='?', const='yes', action='store') + + parser = ArgumentParser(description='Configure FLINT for building with meson') parser.add_argument('--build-dir', default='build.meson', help='Build directory') @@ -19,24 +65,23 @@ parser.add_argument('--includedir', default=None, help='Include directory') parser.add_argument('--build', default=None, help='Not supported...') parser.add_argument('--host', default=None, help='Not supported...') -parser.add_argument('--disable-shared', default=False, action='store_true', help='Do not build shared libraries') -parser.add_argument('--enable-static', default=False, action='store_true', help='Build static libraries') - -parser.add_argument('--disable-libtool-lock', default=None, help='Not supported...') -parser.add_argument('--enable-pthread', default=None, help='Enable pthread support') -parser.add_argument('--enable-reentrant', default=None, help='Not supported...') -parser.add_argument('--enable-thread-safe', default=None, help='Make the library thread-safe') -parser.add_argument('--enable-assert', default=None, help='Not supported...') -parser.add_argument('--enable-coverage', default=None, help='Not supported...') -parser.add_argument('--enable-debug', default=None, help='Not supported...') -parser.add_argument('--enable-dependency-tracking', default=None, help='Not supported...') -parser.add_argument('--enable-pretty-tests', default=None, help='Not supported...') +add_feature_option(parser, 'shared') +add_feature_option(parser, 'static') -parser.add_argument('--enable-gmp-internals', default=None, help='Use GMP internals') +add_feature_option(parser, 'libtool-lock') +add_feature_option(parser, 'pthread') +add_feature_option(parser, 'reentrant') +add_feature_option(parser, 'thread-safe') +add_feature_option(parser, 'assert') +add_feature_option(parser, 'coverage') +add_feature_option(parser, 'debug') +add_feature_option(parser, 'dependency-tracking') +add_feature_option(parser, 'pretty-tests') -parser.add_argument('--enable-assembly', default=None, choices=['yes', 'no', 'auto'], help='Enable assembly routines (if available)') -parser.add_argument('--enable-avx2', default=None, choices=['yes', 'no', 'auto'], help='Use AVX2 instructions') -parser.add_argument('--enable-avx512', default=None, choices=['yes', 'no', 'auto'], help='Use AVX512 instructions') +add_feature_option(parser, 'gmp-internals') +add_feature_option(parser, 'assembly') +add_feature_option(parser, 'avx2') +add_feature_option(parser, 'avx512') parser.add_argument('--with-gmp', default=None, help='GMP install directory') parser.add_argument('--with-mpfr', default=None, help='MPFR install directory') @@ -46,24 +91,6 @@ parser.add_argument('--with-gc', default=None, help='Not supported...') parser.add_argument('--with-ntl', default=None, help='Not supported...') -def run_command(cmd): - print('-' * 80) - print('$', ' '.join(cmd)) - print('-' * 80) - check_call(cmd) - - -def enabled_disabled(value): - if value == 'yes': - return 'enabled' - elif value == 'no': - return 'disabled' - elif value == 'auto': - return 'auto' - else: - raise ValueError('Invalid value: ' + value) - - def get_meson_command_from_configure_args(args): """ Translate e.g. @@ -85,48 +112,68 @@ def get_meson_command_from_configure_args(args): if args.prefix is not None: setup_args.append('--prefix=' + args.prefix) - if args.enable_static and args.disable_shared: + do_shared = enable_disable_to_do(args, 'shared') + do_static = enable_disable_to_do(args, 'static') + + do_libtool_lock = enable_disable_to_do(args, 'libtool_lock') + do_pthread = enable_disable_to_do(args, 'pthread') + do_reentrant = enable_disable_to_do(args, 'reentrant') + do_thread_safe = enable_disable_to_do(args, 'thread_safe') + do_assert = enable_disable_to_do(args, 'assert') + do_coverage = enable_disable_to_do(args, 'coverage') + do_debug = enable_disable_to_do(args, 'debug') + do_dependency_tracking = enable_disable_to_do(args, 'dependency_tracking') + do_pretty_tests = enable_disable_to_do(args, 'pretty_tests') + + do_gmp_internals = enable_disable_to_do(args, 'gmp_internals') + do_assembly = enable_disable_to_do(args, 'assembly') + do_avx2 = enable_disable_to_do(args, 'avx2') + do_avx512 = enable_disable_to_do(args, 'avx512') + + if do_shared is None: + do_shared = True + if do_static is None: + do_static = False + + if do_shared and not do_static: + pass + elif not do_shared and do_static: setup_args.append('--default-library=static') - elif args.enable_static and not args.disable_shared: + elif do_shared and do_static: setup_args.append('--default-library=both') - elif not args.enable_static and not args.disable_shared: - pass - elif not args.enable_static and args.disable_shared: - raise ValueError('Cannot use --enable-static and --disable-shared together') - - if args.disable_libtool_lock is not None: - raise ValueError('--disable-libtool-lock is not supported') - if args.enable_pthread is not None: - setup_args.append('-Dpthread=' + enabled_disabled(args.enable_pthread)) - if args.enable_reentrant is not None: - raise ValueError('--enable-reentrant is not supported') - if args.enable_thread_safe is not None: - setup_args.append('-Dthread_safe=' + enabled_disabled(args.enable_thread_safe)) - if args.enable_assert is not None: - raise ValueError('--enable-assert is not supported') - if args.enable_coverage is not None: - raise ValueError('--enable-coverage is not supported') - if args.enable_debug is not None: - raise ValueError('--enable-debug is not supported') - if args.enable_dependency_tracking is not None: - raise ValueError('--enable-dependency-tracking is not supported') - if args.enable_pretty_tests is not None: - raise ValueError('--enable-pretty-tests is not supported') - - if args.enable_gmp_internals is not None: - setup_args.append('-Dgmp_internals=' + enabled_disabled(args.enable_gmp_internals)) - - if args.enable_assembly is not None: - setup_args.append('-Dassembly=' + enabled_disabled(args.enable_assembly)) - - if args.enable_avx2 is not None or args.enable_avx512 is not None: - if 'yes' in (args.enable_avx2, args.enable_avx512): - fft_small = 'enabled' - elif 'no' in (args.enable_avx2, args.enable_avx512): - fft_small = 'disabled' - else: - fft_small = 'auto' - setup_args.append('-Dfft_small=' + fft_small) + else: + raise ValueError('Cannot disable both shared and static libraries') + + if do_debug is True: + setup_args.append('--buildtype=debugoptimized') + + if do_libtool_lock is not None: + setup_args.append('-Dlibtool_lock=' + 'disabled') + if do_pthread is not None: + setup_args.append('-Dpthread=' + enabled_disabled(do_pthread)) + if do_reentrant is not None: + setup_args.append('-Dreentrant=' + enabled_disabled(do_reentrant)) + if do_thread_safe is not None: + setup_args.append('-Dthread_safe=' + enabled_disabled(do_thread_safe)) + if do_assert is not None: + setup_args.append('-Dassert=' + enabled_disabled(do_assert)) + if do_coverage is not None: + setup_args.append('-Db_coverage=' + true_false(do_coverage)) + if do_dependency_tracking is not None: + pass # Meson always does dependency tracking with Ninja + if do_pretty_tests is not None: + setup_args.append('-Dpretty_tests=' + enabled_disabled(do_pretty_tests)) + + if do_gmp_internals is not None: + setup_args.append('-Dgmp_internals=' + enabled_disabled(do_gmp_internals)) + + if do_assembly is not None: + setup_args.append('-Dassembly=' + enabled_disabled(do_assembly)) + + if do_avx2 is False or do_avx512 is False: + setup_args.append('-Dfft_small=' + 'disabled') + elif do_avx2 is True or do_avx512 is True: + setup_args.append('-Dfft_small=' + 'enabled') if args.with_gmp is not None: setup_args.append('--pkg-config-path=' + join(args.with_gmp, 'lib', 'pkgconfig')) @@ -149,7 +196,8 @@ def main(*args): # The default behaviour of ./configure is to basically wipe out the build. # Everything is then rebuilt from scratch. We will do the same here to # match the semantics of configure which does not preserve any settings - # from one run of configure to the next. + # from one run of configure to the next. When using meson directly, it is + # better not to do this because the files might not need to be rebuilt. shutil.rmtree(args.build_dir, ignore_errors=True) run_command(cmd) diff --git a/_meson_build/meson.options b/_meson_build/meson.options index d5dc9d2d32..88b74613de 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -1,16 +1,38 @@ option('tests', type : 'feature', value : 'disabled', description: 'Build the tests') -option('fft_small', type : 'feature', value : 'auto', - description: 'Build the fft_small module') -option('assembly', type : 'feature', value : 'auto', - description: 'Use assembly code') -option('gc', type : 'feature', value : 'disabled', - description: 'Use the Boehm garbage collector') -option('pthread', type : 'feature', value : 'auto', +option('libtool_lock', type : 'feature', value : 'enabled', + description: 'Use libtool lock') +option('pthread', type : 'feature', value : 'enabled', description: 'Use pthread') option('reentrant', type : 'feature', value : 'disabled', description: 'Build the reentrant module') option('thread_safe', type : 'feature', value : 'enabled', description: 'Build the threadsafe module') +option('assert', type : 'feature', value : 'disabled', + description: 'Enable assertions') +option('pretty_tests', type : 'feature', value : 'enabled', + description: 'Pretty print test output') option('gmp_internals', type : 'feature', value : 'auto', description: 'Use GMP internals') +option('assembly', type : 'feature', value : 'auto', + description: 'Use assembly code') +option('avx2', type : 'feature', value : 'auto', + description: 'Use AVX2 instructions') +option('avx512', type : 'feature', value : 'auto', + description: 'Use AVX512 instructions') +option('fft_small', type : 'feature', value : 'auto', + description: 'Build the fft_small module') +option('blas', type : 'feature', value : 'disabled', + description: 'Use BLAS') +option('gc', type : 'feature', value : 'disabled', + description: 'Use the Boehm garbage collector') +option('ntl', type : 'feature', value : 'disabled', + description: 'Use NTL (in tests)') +# Not included from original configure: +# coverage -Db_coverage=true +# debug +# dependency_tracking +# with-pic +# with-aix-soname +# with-gnu-ld +# with-sysroot diff --git a/detection/meson.build b/detection/meson.build index 92414e0a62..24baea53f4 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -10,25 +10,49 @@ cfg_data = configuration_data() # Project options # ----------------------------------------------------------------------------- -gmp_internals_opt = get_option('gmp_internals') +libtool_lock_opt = get_option('libtool_lock') pthread_opt = get_option('pthread') +reentrant_opt = get_option('reentrant') +thread_safe_opt = get_option('thread_safe') +assert_opt = get_option('assert') +pretty_tests_opt = get_option('pretty_tests') +gmp_internals_opt = get_option('gmp_internals') +assembly_opt = get_option('assembly') +avx2_opt = get_option('avx2') +avx512_opt = get_option('avx512') +fft_small_opt = get_option('fft_small') +blas_opt = get_option('blas') +gc_opt = get_option('gc') +ntl_opt = get_option('ntl') # ----------------------------------------------------------------------------- -# fmpz memory management +# Unsupported options # ----------------------------------------------------------------------------- -enable_gc = get_option('gc').enabled() -enable_reentrant = get_option('reentrant').enabled() -enable_thread_safe = get_option('thread_safe').enabled() +if avx2_opt.enabled() + error('AVX2 support is not yet implemented') +elif avx512_opt.enabled() + error('AVX512 support is not yet implemented') +elif blas_opt.enabled() + error('BLAS support is not yet implemented') +elif gc_opt.enabled() + error('Garbage collection is not yet implemented') +elif ntl_opt.enabled() + error('NTL support is not yet implemented') +endif -if enable_gc - if enable_thread_safe +# ----------------------------------------------------------------------------- +# fmpz memory management +# ----------------------------------------------------------------------------- + +if gc_opt.allowed() + if thread_safe_opt.allowed() error('Garbage collection is not thread safe') else fmpz_c_in = 'fmpz_gc.c' endif else - if enable_reentrant + if reentrant_opt.enabled() fmpz_c_in = 'fmpz_reentrant.c' else fmpz_c_in = 'fmpz_single.c' @@ -240,12 +264,31 @@ if host_machine.system() != 'windows' endif endif +# ----------------------------------------------------------------------------- +# cpu_set_t support +# ----------------------------------------------------------------------------- + +have_cpu_set_t = cc.compiles(''' +#define _GNU_SOURCE +#include +#include + +int main() { + cpu_set_t s; + CPU_ZERO(&s); + pthread_getaffinity_np(pthread_self(), sizeof(cpu_set_t), &s); + return 0; +} +''') + # ----------------------------------------------------------------------------- # external configuration for flint_config.h # ----------------------------------------------------------------------------- -# cfg_data.set('FLINT_BIG_ENDIAN', 1, -# description: 'Define if system is big endian.') +if host_machine.endian() == 'big' + cfg_data.set('FLINT_BIG_ENDIAN', 1, + description: 'Define if system is big endian.') +endif if have_assembly and FLINT_HAVE_ASSEMBLY == 'armv8' cfg_data.set('FLINT_HAVE_ASSEMBLY_armv8', 1, @@ -260,39 +303,57 @@ if have_fft_small description: 'Define to use the fft_small module') endif +# XXX: Need better CPU detection # cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, # description: 'Define if system is strongly ordered') -# cfg_data.set('FLINT_REENTRANT', 0, -# description: 'Define to enable reentrant.') + +if reentrant_opt.enabled() + cfg_data.set('FLINT_REENTRANT', 1, + description: 'Define to enable reentrant.') +endif + cfg_data.set('FLINT_UNROLL_LOOPS', 1, description: 'Define to locally unroll some loops') -# cfg_data.set('FLINT_USES_BLAS', 0, -# description: 'Define to enable BLAS.') -# cfg_data.set('FLINT_USES_CPUSET', 0, -# description: 'Define if system has cpu_set_t') -# cfg_data.set('FLINT_USES_GC', 0, -# description: 'Define to enable the Boehm-Demers-Weise garbage collector.') - -if pthread_opt.allowed() + +if blas_opt.enabled() + cfg_data.set('FLINT_USES_BLAS', 1, + description: 'Define to enable BLAS.') +endif + +if have_cpu_set_t + cfg_data.set('FLINT_USES_CPUSET', 1, + description: 'Define if system has cpu_set_t') +endif + +if gc_opt.enabled() + cfg_data.set('FLINT_USES_GC', 1, + description: 'Define to enable the Boehm-Demers-Weise garbage collector.') +endif + +if pthread_opt.enabled() cfg_data.set('FLINT_USES_PTHREAD', 1, description: 'Define to enable the use of pthread.') endif -if enable_thread_safe +if thread_safe_opt.enabled() cfg_data.set('FLINT_USES_TLS', 1, description: 'Define to enable thread-local storage.') endif -# cfg_data.set('FLINT_WANT_WANT_ASSERT', 1, -# description: 'Define to enable use of asserts.') +if assert_opt.enabled() + cfg_data.set('FLINT_WANT_ASSERT', 1, + description: 'Define to enable use of asserts.') +endif if gmp_internals_opt.allowed() cfg_data.set('FLINT_WANT_GMP_INTERNALS', 1, description: 'Define to enable use of GMP internals.') endif -cfg_data.set('FLINT_WANT_PRETTY_TESTS', 1, - description: 'Define to enable pretty printing for tests.') +if pretty_tests_opt.enabled() + cfg_data.set('FLINT_WANT_PRETTY_TESTS', 1, + description: 'Define to enable pretty printing for tests.') +endif # ----------------------------------------------------------------------------- # internal configuration for config.h @@ -344,8 +405,10 @@ endforeach # XXX: Do we need to check for _alligned_malloc? +# XXX: Need better checking for LSYM_PREFIX and related assembly options cfg_data_internal.set_quoted('LSYM_PREFIX', 'L', description: 'Assembler local label prefix') + cfg_data_internal.set_quoted('LT_OBJDIR', '.libs/', description: 'Define to the sub-directory where libtool stores uninstalled libraries.') cfg_data_internal.set_quoted('PACKAGE_BUGREPORT', From 5a3a511dec7298461c4e2066847b510c28b1c01a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 11:50:17 +0100 Subject: [PATCH 024/104] build: Fix Makefile install dep in meson build --- _meson_build/Makefile | 2 +- _meson_build/configure | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_meson_build/Makefile b/_meson_build/Makefile index bba723902f..775b1dd74d 100644 --- a/_meson_build/Makefile +++ b/_meson_build/Makefile @@ -12,7 +12,7 @@ $(BUILDDIR)/.build-dir-created: clean: rm -rf $(BUILDDIR) -install: compile +install: setup meson install -C $(BUILDDIR) test: setup diff --git a/_meson_build/configure b/_meson_build/configure index a0c82952bc..a29758345f 100755 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -200,6 +200,9 @@ def main(*args): # better not to do this because the files might not need to be rebuilt. shutil.rmtree(args.build_dir, ignore_errors=True) run_command(cmd) + # The Makefile uses this to check if project is configured + with open(join(args.build_dir, '.build-dir-created'), 'w') as f: + pass if __name__ == '__main__': From 1513f4fe5a903b092e9e2f2e1c0703f8eacb7ecd Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 12:49:33 +0100 Subject: [PATCH 025/104] build: Add make uninstall --- _meson_build/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_meson_build/Makefile b/_meson_build/Makefile index 775b1dd74d..f7c024c34d 100644 --- a/_meson_build/Makefile +++ b/_meson_build/Makefile @@ -15,6 +15,9 @@ clean: install: setup meson install -C $(BUILDDIR) +uninstall: + cd $(BUILDDIR) && ninja uninstall + test: setup meson configure $(BUILDDIR) -Dtests=enabled meson test -C $(BUILDDIR) From a639c5ee640b97deda6cdfd8fac53fcd27d2f38f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 13:29:48 +0100 Subject: [PATCH 026/104] build: fix installing headers in meson build --- _meson_build/configure | 2 ++ _meson_build/include/flint/meson.build | 28 +++++++++++++++++--------- _meson_build/include/meson.build | 1 + _meson_build/meson.build | 2 -- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/_meson_build/configure b/_meson_build/configure index a29758345f..2f0f34592c 100755 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -107,6 +107,8 @@ def get_meson_command_from_configure_args(args): setup_args.append('--bindir=' + args.bindir) if args.libdir is not None: setup_args.append('--libdir=' + args.libdir) + else: + setup_args.append('--libdir=lib') if args.includedir is not None: setup_args.append('--includedir=' + args.includedir) if args.prefix is not None: diff --git a/_meson_build/include/flint/meson.build b/_meson_build/include/flint/meson.build index 2515f636af..9848867438 100644 --- a/_meson_build/include/flint/meson.build +++ b/_meson_build/include/flint/meson.build @@ -1,3 +1,8 @@ +header_install_kwargs = { + 'install_dir': get_option('includedir') / 'flint', + 'install': true, +} + flint_h = configure_file( input: '../../src/flint.h.in', output: 'flint.h', @@ -6,17 +11,20 @@ flint_h = configure_file( 'FLINT_MINOR': FLINT_MINOR, 'FLINT_PATCH': FLINT_PATCH, 'FLINT_VERSION_FULL': FLINT_VERSION_FULL, - } + }, + kwargs: header_install_kwargs, ) flint_config_h = configure_file( output: 'flint-config.h', configuration: cfg_data, + kwargs: header_install_kwargs, ) config_h = configure_file( output: 'config.h', configuration: cfg_data_internal, + kwargs: header_install_kwargs, ) if gmp_long_long_limb @@ -25,24 +33,24 @@ else gmpcompat_h_in = 'gmpcompat.h.in' endif -gmpcompat_h = configure_file( - input: '../../src' / gmpcompat_h_in, - output: 'gmpcompat.h', - copy: true, +gmpcompat_h = fs.copyfile( + '../../src' / gmpcompat_h_in, + 'gmpcompat.h', + kwargs: header_install_kwargs, ) flint_mparam_h_in = '../../src/mpn_extras' / flint_mparam / 'flint-mparam.h' -flint_mparam_h = configure_file( - input: flint_mparam_h_in, - output: 'flint-mparam.h', - copy: true, +flint_mparam_h = fs.copyfile( + flint_mparam_h_in, + 'flint-mparam.h', + kwargs: header_install_kwargs, ) # Copy all the other headers to the build directory so you can do # gcc -Ibuild-dir/include ... foreach h: headers_all - fs.copyfile(h) + fs.copyfile(h, kwargs: header_install_kwargs) endforeach headers_all += [ diff --git a/_meson_build/include/meson.build b/_meson_build/include/meson.build index a670a21e97..39b83d76e8 100644 --- a/_meson_build/include/meson.build +++ b/_meson_build/include/meson.build @@ -1,3 +1,4 @@ subdir('flint') + headers_built_inc = include_directories('.') headers_built_nodir_inc = include_directories('flint') diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 96a32fffc2..96d423f35f 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -46,8 +46,6 @@ endif # Build include directory after list of all source files is complete subdir('include') -install_headers(headers_all, subdir: 'flint') - libflint = library('flint', c_files_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], From 2ab6dae6c41152bd6cbc16851e1029650cc5c0f2 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 16:37:48 +0100 Subject: [PATCH 027/104] build: disable avx2 and avx512 by default --- _meson_build/meson.options | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_meson_build/meson.options b/_meson_build/meson.options index 88b74613de..dbaa7eaaaf 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -16,9 +16,9 @@ option('gmp_internals', type : 'feature', value : 'auto', description: 'Use GMP internals') option('assembly', type : 'feature', value : 'auto', description: 'Use assembly code') -option('avx2', type : 'feature', value : 'auto', +option('avx2', type : 'feature', value : 'disabled', description: 'Use AVX2 instructions') -option('avx512', type : 'feature', value : 'auto', +option('avx512', type : 'feature', value : 'disabled', description: 'Use AVX512 instructions') option('fft_small', type : 'feature', value : 'auto', description: 'Build the fft_small module') From 81faa87c50aa2b9de19cc3f4b71369998780ee2d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 17:12:21 +0100 Subject: [PATCH 028/104] build: detect fft_small requirements in meson build --- detection/meson.build | 49 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/detection/meson.build b/detection/meson.build index 24baea53f4..a03e2da225 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -182,12 +182,51 @@ endif fft_small_opt = get_option('fft_small') -# check for headers used by fft_small -# XXX: Need to actually compile a test program to check for AVX support -has_avx = cc.has_header('immintrin.h') -has_neon = cc.has_header('arm_neon.h') +fft_small_arm_code = ''' +#include +#if GMP_LIMB_BITS != 64 +# error +error +#endif + +#include +#if !(defined(__GNUC__) && defined(__ARM_NEON)) +# if !(defined(_MSC_VER) && defined(_M_ARM64)) +# error +error +# endif +#endif +void main(){}; +''' + +fft_small_x86_code = ''' +#include +#if GMP_LIMB_BITS != 64 +# error +error +#endif + +#if defined(__GNUC__) +# include +#elif defined(_MSC_VER) +# include +#else +# error +error +#endif + +#if !defined(__AVX2__) +# error +error +#endif +void main(){}; +''' -fft_small_supported = has_avx or has_neon +# XXX: Do we need to check ARM64_PATTERN/X86_64_PATTERN? +fft_small_supported = ( + cc.compiles(fft_small_arm_code, dependencies: gmp_dep) + or cc.compiles(fft_small_x86_code, dependencies: gmp_dep) +) # Error if fft_small enabled but not possible, otherwise disable if auto fft_small_opt = fft_small_opt.require(fft_small_supported, From 74944a19550189e4b298b62900d69062b1b7a379 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Apr 2024 17:19:06 +0100 Subject: [PATCH 029/104] build: fix fft_small checking --- detection/meson.build | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/detection/meson.build b/detection/meson.build index a03e2da225..08afd407f7 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -183,12 +183,6 @@ endif fft_small_opt = get_option('fft_small') fft_small_arm_code = ''' -#include -#if GMP_LIMB_BITS != 64 -# error -error -#endif - #include #if !(defined(__GNUC__) && defined(__ARM_NEON)) # if !(defined(_MSC_VER) && defined(_M_ARM64)) @@ -196,16 +190,10 @@ error error # endif #endif -void main(){}; +int main(){return 0;} ''' fft_small_x86_code = ''' -#include -#if GMP_LIMB_BITS != 64 -# error -error -#endif - #if defined(__GNUC__) # include #elif defined(_MSC_VER) @@ -219,7 +207,7 @@ error # error error #endif -void main(){}; +int main(){return 0;} ''' # XXX: Do we need to check ARM64_PATTERN/X86_64_PATTERN? From ba2770a77ed90d792e74bf6d83e0aa1caafdaa95 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 20 Jun 2024 15:11:55 +0100 Subject: [PATCH 030/104] Run config.guess to check for exact CPU --- detection/meson.build | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/detection/meson.build b/detection/meson.build index 08afd407f7..84b7b3cb8e 100644 --- a/detection/meson.build +++ b/detection/meson.build @@ -176,6 +176,25 @@ if gmp_internals_opt.allowed() endif +# ----------------------------------------------------------------------------- +# CPU detection +# ----------------------------------------------------------------------------- + +# We check here for gcc or clang because the config.guess script probably does +# not work for other compilers. This check will also allow MinGW and cygwin on +# Windows but not MSVC. + +# The config.guess script inspects the current CPU so should not be used for a +# cross build. Maybe there should be a way to configure the exact CPU as a +# project build option. + +if not meson.is_cross_build() and cc.get_id() in ['gcc', 'clang'] + config_guess_result = run_command('../config/config.guess', check: true) + target_triple = config_guess_result.stdout().strip() + exact_cpu = target_triple.split('-')[0] + message('EXACT CPU:', exact_cpu) +endif + # ----------------------------------------------------------------------------- # fft_small # ----------------------------------------------------------------------------- From 30773a90d1e7f806b8a26b943b5a4746c00d733e Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 20 Jun 2024 15:27:22 +0100 Subject: [PATCH 031/104] Move detection script to config dir --- _meson_build/meson.build | 2 +- {detection => config}/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename {detection => config}/meson.build (99%) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 96d423f35f..fb81b3588e 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -27,7 +27,7 @@ add_project_arguments( language: 'c', ) -subdir('detection') +subdir('config') subdir('src') if have_assembly diff --git a/detection/meson.build b/config/meson.build similarity index 99% rename from detection/meson.build rename to config/meson.build index 84b7b3cb8e..827173ff76 100644 --- a/detection/meson.build +++ b/config/meson.build @@ -189,7 +189,7 @@ endif # project build option. if not meson.is_cross_build() and cc.get_id() in ['gcc', 'clang'] - config_guess_result = run_command('../config/config.guess', check: true) + config_guess_result = run_command('./config.guess', check: true) target_triple = config_guess_result.stdout().strip() exact_cpu = target_triple.split('-')[0] message('EXACT CPU:', exact_cpu) From c34b9814a7348c8459d902ba9705514c1137af8a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 20 Jun 2024 18:03:17 +0100 Subject: [PATCH 032/104] Add CPU configuration tables to meson build --- config/meson.build | 307 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 306 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 827173ff76..ea8730cc96 100644 --- a/config/meson.build +++ b/config/meson.build @@ -192,7 +192,312 @@ if not meson.is_cross_build() and cc.get_id() in ['gcc', 'clang'] config_guess_result = run_command('./config.guess', check: true) target_triple = config_guess_result.stdout().strip() exact_cpu = target_triple.split('-')[0] - message('EXACT CPU:', exact_cpu) +else + # This could be 'aarch64' or 'x86_64' + # https://mesonbuild.com/Reference-tables.html#cpu-families + exact_cpu = host_machine.cpu_family() +endif + +message('EXACT CPU:', exact_cpu) + +################################################################################ +# architecture specifics +################################################################################ + +gcc_cflags = '-O3 -pedantic -std=c11' +gcc_warnings = '-Werror=implicit-function-declaration -Wall -Wno-stringop-overread -Wno-stringop-overflow' + +# We only try to provide specifics for those systems that currently supports +# our assembly routines. If more combinations are wished for than what is +# specified, please open up an issue at +# and we will consider it. +# +# For these systems we aim to provide: +# +# gcc_cflags flags for GCC-compatible compilers +# +# asm_path directory for assembly, relative to src/mpn_extras +# param_path directory for flint-mparam.h, relative to src/mpn_extras +# +# For x86_64 systems, we can also set: +# +# have_avx512 system has AVX512F and AVX512DQ (we assume this implies have_avx2) +# have_avx2 system has AVX2 and FMA + +# x86_64 CPUs that have AVX2: +X86_64_ADX_CPU_NAMES = [ + 'zen1', + 'zen2', + 'zen3', + 'zen4', + 'coreibwl', + 'broadwell', + 'skylake', + 'skylake_server', + 'cannonlake', + 'kabylake', + 'icelake', + 'icelake_server', + 'rocketlake', + 'tigerlake', + 'alderlake', + 'raptorlake', + 'knightslanding', + 'sapphirerapids', + 'cometlake', +] + +if host_machine.cpu_family() == 'aarch64' + + gcc_cflags = gcc_cflags + gcc_cflags_optlist = 'arch tune' + asm_path = 'arm64' + param_path = 'arm64' + flint_cv_have_fft_small_arm_i = 'yes' + + # NOTE: Cortex values where taken from + # https://developer.arm.com/Processors/Cortex-XXX + + if exact_cpu in ['armcortexa35', 'armcortexa35neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a35' + + elif exact_cpu in ['armcortexa53', 'armcortexa53neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a53' + + elif exact_cpu in ['armcortexa55', 'armcortexa55neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a55' + + elif exact_cpu in ['armcortexa57', 'armcortexa57neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a57' + + elif exact_cpu in ['armcortexa72', 'armcortexa72neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a72' + + elif exact_cpu in ['armcortexa73', 'armcortexa73neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a73' + + elif exact_cpu in ['armcortexa75', 'armcortexa75neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a75' + + elif exact_cpu in ['armcortexa76', 'armcortexa76neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a76' + + elif exact_cpu in ['armcortexa77', 'armcortexa77neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a77' + + elif exact_cpu in ['armcortexa65', 'armcortexa65neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a65' + + elif exact_cpu in ['armcortexa34', 'armcortexa34neon'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=cortex-a34' + + elif exact_cpu in ['armcortexa78', 'armcortexa78neon'] + gcc_cflags_arch = '-march=armv8.2-a' + gcc_cflags_tune = '-mtune=cortex-a78' + + elif exact_cpu in ['armexynosm1'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=exynos-m1' + + elif exact_cpu in ['armthunderx'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=thunderx' + + elif exact_cpu in ['armxgene1'] + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '-mtune=xgene1' + + elif exact_cpu.startswith('applem1') + gcc_cflags_arch = '-march=armv8.5-a' + gcc_cflags_tune = '' + + elif exact_cpu.startswith('applem2') + gcc_cflags_arch = '-march=armv8.6-a' + gcc_cflags_tune = '' + + elif exact_cpu.startswith('applem3') + gcc_cflags_arch = '-march=armv8.6-a' + gcc_cflags_tune = '' + + elif exact_cpu.startswith('aarch64') or exact_cpu.startswith('armv8') + gcc_cflags_arch = '-march=armv8-a' + gcc_cflags_tune = '' + + else + error_msg = ''' + Error in deciding flags for @0@. + Please report at + ''' + error(error_msg.format(exact_cpu)) + + endif + +elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES + + gcc_cflags = gcc_cflags + gcc_cflags_optlist = 'arch' + asm_path = 'x86_64/broadwell' + param_path = 'x86_64/broadwell' + + have_avx512 = 'no' + have_avx2 = 'yes' + flint_cv_have_fft_small_x86_i = 'yes' + + if exact_cpu == 'zen' + gcc_cflags_arch = '-march=znver1' + param_path = 'x86_64/zen3' + + elif exact_cpu == 'zen2' + gcc_cflags_arch = '-march=znver2' + param_path = 'x86_64/zen3' + + elif exact_cpu == 'zen3' + gcc_cflags_arch = '-march=znver3' + param_path = 'x86_64/zen3' + + elif exact_cpu == 'zen4' + gcc_cflags_arch = '-march=znver4' + param_path = 'x86_64/zen3' + have_avx512 = 'yes' + + elif exact_cpu in ['coreibwl', 'broadwell'] + gcc_cflags_arch = '-march=broadwell' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'skylake' + gcc_cflags_arch = '-march=skylake' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'skylake_server' + gcc_cflags_arch = '-march=skylake-avx512' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'cannonlake' + gcc_cflags_arch = '-march=cannonlake' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'kabylake' + gcc_cflags_arch = '-march=skylake' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'icelake' + gcc_cflags_arch = '-march=icelake-client' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'icelake_server' + gcc_cflags_arch = '-march=icelake-server' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'rocketlake' + gcc_cflags_arch = '-march=rocketlake' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'tigerlake' + gcc_cflags_arch = '-march=tigerlake' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'alderlake' + gcc_cflags_arch = '-march=alderlake' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'raptorlake' + gcc_cflags_arch = '-march=alderlake' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'knightslanding' + gcc_cflags_arch = '-march=knl' + param_path = 'x86_64/skylake' + + elif exact_cpu == 'sapphirerapids' + gcc_cflags_arch = '-march=sapphirerapids' + param_path = 'x86_64/skylake' + have_avx512 = 'yes' + + elif exact_cpu == 'cometlake' + gcc_cflags_arch = '-march=kabylake' + param_path = 'x86_64/skylake' + + else + error_msg = ''' + Error in deciding flags for @0@. + Please report at + ''' + error(error_msg.format(exact_cpu)) + + endif + + # Disable assembly on Windows + if host_machine.system() == 'windows' + flint_nonstd_abi = 'yes' + asm_path = '' + param_path = 'x86_64' + endif + +elif host_machine.cpu_family() == 'x86_64' + + # NOTE: We do not care if the user specifies noavx! + gcc_cflags = '$gcc_cflags' + gcc_cflags_optlist = 'arch' + asm_path = '' + param_path = 'x86_64' + + if exact_cpu in ['coreiibr', 'ivybridge'] + gcc_cflags_arch = '-march=ivybridge' + + elif exact_cpu in ['coreihwl', 'haswell'] + gcc_cflags_arch = '-march=haswell' + + elif exact_cpu in ['piledriver', 'bd2'] + gcc_cflags_arch = '-march=bdver2' + + elif exact_cpu in ['steamroller', 'bd3'] + gcc_cflags_arch = '-march=bdver3' + + elif exact_cpu in ['excavator', 'bd4'] + gcc_cflags_arch = '-march=bdver4' + have_avx2 = 'yes' + + elif exact_cpu in ['x86_64v3'] + gcc_cflags_arch = '-march=x86-64-v3' + have_avx2 = 'yes' + + elif exact_cpu in ['x86_64v4'] + gcc_cflags_arch = '-march=x86-64-v4' + have_avx512 = 'yes' + + endif + + if have_avx512 == 'yes' + have_avx2 = 'yes' + endif + + if have_avx2 == 'yes' + flint_cv_have_fft_small_x86_i = 'yes' + endif + +else + # Generic case for unrecognised CPU + asm_path = '' + param_path = 'generic' + gcc_cflags = gcc_cflags + endif # ----------------------------------------------------------------------------- From 9024028a4b7101101e43c557d64cd18cdf851993 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 22 Jun 2024 13:43:45 +0100 Subject: [PATCH 033/104] Enable assembly based on exact_cpu in meson build --- config/meson.build | 86 ++++++++++++++++++++-------------------------- 1 file changed, 38 insertions(+), 48 deletions(-) diff --git a/config/meson.build b/config/meson.build index ea8730cc96..4c8c74ac54 100644 --- a/config/meson.build +++ b/config/meson.build @@ -458,6 +458,9 @@ elif host_machine.cpu_family() == 'x86_64' asm_path = '' param_path = 'x86_64' + have_avx512 = 'no' + have_avx2 = 'no' + if exact_cpu in ['coreiibr', 'ivybridge'] gcc_cflags_arch = '-march=ivybridge' @@ -490,6 +493,8 @@ elif host_machine.cpu_family() == 'x86_64' if have_avx2 == 'yes' flint_cv_have_fft_small_x86_i = 'yes' + else + flint_cv_have_fft_small_x86_i = 'no' endif else @@ -498,8 +503,17 @@ else param_path = 'generic' gcc_cflags = gcc_cflags + have_avx512 = 'no' + have_avx2 = 'no' + endif +# ----------------------------------------------------------------------------- +# mparam +# ----------------------------------------------------------------------------- + +flint_mparam = param_path + # ----------------------------------------------------------------------------- # fft_small # ----------------------------------------------------------------------------- @@ -534,11 +548,17 @@ error int main(){return 0;} ''' -# XXX: Do we need to check ARM64_PATTERN/X86_64_PATTERN? -fft_small_supported = ( - cc.compiles(fft_small_arm_code, dependencies: gmp_dep) - or cc.compiles(fft_small_x86_code, dependencies: gmp_dep) -) +if host_machine.cpu_family() == 'aarch64' + fft_small_supported = ( + flint_cv_have_fft_small_arm_i == 'yes' + and cc.compiles(fft_small_arm_code, dependencies: gmp_dep) + ) +else + fft_small_supported = ( + flint_cv_have_fft_small_x86_i == 'yes' + and cc.compiles(fft_small_x86_code, dependencies: gmp_dep) + ) +endif # Error if fft_small enabled but not possible, otherwise disable if auto fft_small_opt = fft_small_opt.require(fft_small_supported, @@ -551,34 +571,27 @@ have_fft_small = fft_small_opt.enabled() message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') # ----------------------------------------------------------------------------- -# assembly +# Assembly # ----------------------------------------------------------------------------- -assembly_opt = get_option('assembly') - -# Might be better to check for known good operating systems rather than -# exclude known bad ones. -assembly_opt = assembly_opt.require(host_machine.system() != 'windows', - error_message: 'No assembly support for Windows') - -# Checking for assembly support needs to be more complicated than this. ARM -# needs to be v8 and not sure exactly what to check for x86_64. For now -# the checks below would attempt to build assembly on some systems that do not -# support it. The feature can be disabled with -Dassembly=disabled to build on -# those systems. -if host_machine.cpu_family() == 'aarch64' - assembly_cpu_supported = true - assembly_dir = 'mpn_extras/arm64' - FLINT_HAVE_ASSEMBLY = 'armv8' -elif host_machine.cpu_family() == 'x86_64' +if asm_path != '' assembly_cpu_supported = true - assembly_dir = 'mpn_extras/x86_64/broadwell' - FLINT_HAVE_ASSEMBLY = 'x86_64_adx' + assembly_dir = 'mpn_extras/' + asm_path + if host_machine.cpu_family() == 'aarch64' + FLINT_HAVE_ASSEMBLY = 'armv8' + elif host_machine.cpu_family() == 'x86_64' + FLINT_HAVE_ASSEMBLY = 'x86_64_adx' + else + error('Assembly only supported for x86_64 or aarch64') + endif else assembly_cpu_supported = false FLINT_HAVE_ASSEMBLY = '' endif +assembly_opt = assembly_opt.require(host_machine.system() != 'windows', + error_message: 'No assembly support for Windows') + assembly_opt = assembly_opt.require(assembly_cpu_supported, error_message: 'No assembly support for host CPU') @@ -592,29 +605,6 @@ if have_assembly LSYM_PREFIX = 'L' endif -# ----------------------------------------------------------------------------- -# mparam -# ----------------------------------------------------------------------------- - -flint_mparam = 'generic' - -if host_machine.system() != 'windows' - if host_machine.cpu_family() == 'aarch64' - if host_machine.system() == 'darwin' - flint_mparam = 'arm64/applem1' - else - flint_mparam = 'arm64' - endif - elif host_machine.cpu_family() == 'x86_64' - # XXX: Need better CPU detection - if have_assembly - flint_mparam = 'x86_64/broadwell' - else - flint_mparam = 'generic' - endif - endif -endif - # ----------------------------------------------------------------------------- # cpu_set_t support # ----------------------------------------------------------------------------- From f1ae7da72fcfdabad2b6a7b7cab82f9129a82da7 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 22 Jun 2024 13:58:34 +0100 Subject: [PATCH 034/104] Use exact_cpu to detect FLINT_KNOW_STRONG_ORDER --- config/meson.build | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/config/meson.build b/config/meson.build index 4c8c74ac54..fc65ebdce0 100644 --- a/config/meson.build +++ b/config/meson.build @@ -254,6 +254,7 @@ if host_machine.cpu_family() == 'aarch64' asm_path = 'arm64' param_path = 'arm64' flint_cv_have_fft_small_arm_i = 'yes' + flint_know_strong_order = 'no' # NOTE: Cortex values where taken from # https://developer.arm.com/Processors/Cortex-XXX @@ -353,6 +354,7 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES have_avx512 = 'no' have_avx2 = 'yes' flint_cv_have_fft_small_x86_i = 'yes' + flint_know_strong_order = 'yes' if exact_cpu == 'zen' gcc_cflags_arch = '-march=znver1' @@ -460,6 +462,7 @@ elif host_machine.cpu_family() == 'x86_64' have_avx512 = 'no' have_avx2 = 'no' + flint_know_strong_order = 'yes' if exact_cpu in ['coreiibr', 'ivybridge'] gcc_cflags_arch = '-march=ivybridge' @@ -485,6 +488,9 @@ elif host_machine.cpu_family() == 'x86_64' gcc_cflags_arch = '-march=x86-64-v4' have_avx512 = 'yes' + else + flint_know_strong_order = 'no' + endif if have_avx512 == 'yes' @@ -505,6 +511,8 @@ else have_avx512 = 'no' have_avx2 = 'no' + flint_cv_have_fft_small_x86_i = 'no' + flint_know_strong_order = 'no' endif @@ -644,9 +652,10 @@ if have_fft_small description: 'Define to use the fft_small module') endif -# XXX: Need better CPU detection -# cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, -# description: 'Define if system is strongly ordered') +if flint_know_strong_order == 'yes' + cfg_data.set('FLINT_KNOW_STRONG_ORDER', 1, + description: 'Define if system is strongly ordered') +endif if reentrant_opt.enabled() cfg_data.set('FLINT_REENTRANT', 1, From e265a0f28ff076dd5e8393fae1ebe4eb50794656 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 22 Jun 2024 14:28:24 +0100 Subject: [PATCH 035/104] Set FLINT_COVERAGE for coverage build --- _meson_build/Makefile | 4 ++-- config/meson.build | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/_meson_build/Makefile b/_meson_build/Makefile index f7c024c34d..88907fd785 100644 --- a/_meson_build/Makefile +++ b/_meson_build/Makefile @@ -20,12 +20,12 @@ uninstall: test: setup meson configure $(BUILDDIR) -Dtests=enabled - meson test -C $(BUILDDIR) + meson test -C $(BUILDDIR) --timeout-multiplier 10 coverage: setup # Coverage tool e.g. gcovr needs to be installed *before* meson configure: # pip install gcovr meson configure $(BUILDDIR) -Dtests=enabled -Db_coverage=true - meson test -C $(BUILDDIR) + meson test -C $(BUILDDIR) --timeout-multiplier 10 cd $(BUILDDIR) && ninja coverage-html # open $(BUILDDIR)/meson-logs/coveragereport/index.html diff --git a/config/meson.build b/config/meson.build index fc65ebdce0..3ff0b70173 100644 --- a/config/meson.build +++ b/config/meson.build @@ -24,6 +24,7 @@ fft_small_opt = get_option('fft_small') blas_opt = get_option('blas') gc_opt = get_option('gc') ntl_opt = get_option('ntl') +coverage_opt = get_option('b_coverage') # ----------------------------------------------------------------------------- # Unsupported options @@ -713,8 +714,9 @@ cfg_data_internal = cfg_data #cfg_data_internal.set('AC_APPLE_UNIVERSAL_BUILD', 1) -# XXX: Change this when coverage options are added -#cfg_data_internal.set('FLINT_COVERAGE', 1) +if coverage_opt + cfg_data_internal.set('FLINT_COVERAGE', 1) +endif if cc.has_header_symbol('stdlib.h', 'aligned_alloc') cfg_data_internal.set('HAVE_ALIGNED_ALLOC', 1, From 8c206b112b2f3cdea810e585682cfb2f2a3b7223 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 22 Jun 2024 17:59:36 +0100 Subject: [PATCH 036/104] Add --with-ntl in meson build --- _meson_build/configure | 24 ++++++++++++-------- _meson_build/generate_meson_build.py | 34 ++++++++++++++++++++++++++++ _meson_build/meson.build | 3 ++- config/meson.build | 2 -- 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/_meson_build/configure b/_meson_build/configure index 2f0f34592c..2985c95bf3 100755 --- a/_meson_build/configure +++ b/_meson_build/configure @@ -53,6 +53,11 @@ def add_feature_option(parser, feature): choices=['yes', 'no', 'auto'], nargs='?', const='yes', action='store') +def add_with_option(parser, libname, default): + parser.add_argument('--with-' + libname, help=f'Link to {libname}', + default=default, const=True, nargs='?') + + parser = ArgumentParser(description='Configure FLINT for building with meson') parser.add_argument('--build-dir', default='build.meson', help='Build directory') @@ -83,12 +88,12 @@ add_feature_option(parser, 'assembly') add_feature_option(parser, 'avx2') add_feature_option(parser, 'avx512') -parser.add_argument('--with-gmp', default=None, help='GMP install directory') -parser.add_argument('--with-mpfr', default=None, help='MPFR install directory') +add_with_option(parser, 'gmp', default=True) +add_with_option(parser, 'mpfr', default=True) +add_with_option(parser, 'ntl', default=False) parser.add_argument('--with-blas', default=None, help='Not supported...') parser.add_argument('--with-gc', default=None, help='Not supported...') -parser.add_argument('--with-ntl', default=None, help='Not supported...') def get_meson_command_from_configure_args(args): @@ -177,17 +182,18 @@ def get_meson_command_from_configure_args(args): elif do_avx2 is True or do_avx512 is True: setup_args.append('-Dfft_small=' + 'enabled') - if args.with_gmp is not None: - setup_args.append('--pkg-config-path=' + join(args.with_gmp, 'lib', 'pkgconfig')) - if args.with_mpfr is not None: - setup_args.append('--pkg-config-path=' + join(args.with_mpfr, 'lib', 'pkgconfig')) + for lib in ['gmp', 'mpfr', 'gc', 'ntl', 'blas']: + val = getattr(args, 'with_' + lib) + if isinstance(val, str): + setup_args.append('--pkg-config-path=' + join(val, 'lib', 'pkgconfig')) + + if args.with_ntl: + setup_args.append('-Dntl=enabled') if args.with_blas is not None: raise ValueError('--with-blas is not supported') if args.with_gc is not None: raise ValueError('--with-gc is not supported') - if args.with_ntl is not None: - raise ValueError('--with-ntl is not supported') cmd = ['meson', 'setup', args.build_dir] + setup_args return cmd, args diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 2e1805eb5b..2c77ba07ed 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -146,6 +146,10 @@ headers_all += ['fft_small.h'] endif +if ntl_opt.enabled() + mod_tests += ['interfaces/test'] +endif + headers_all = files(headers_all) ''' @@ -180,6 +184,29 @@ test('%s', test_exe) ''' + +test_mod_NTL_meson_build = '''\ +# This file is generated automatically. +# +# To regenerate it, run: +# python _meson_build/generate_meson_build.py +# + +# NTL no found by pkgconfig +cpp = meson.get_compiler('cpp') +ntl_dep = cpp.find_library('ntl') + +test_exe = executable('main', + 't-NTL-interface.cpp', + dependencies: flint_deps + [ntl_dep], + link_with: libflint, + include_directories: [headers_built_nodir_inc, '../..'], + install: false, +) + +test('%s', test_exe) +''' + asm_submodule_arm64 = '''\ asm_deps = [ @@ -327,6 +354,13 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, test_mod_meson_build_text) + # Build for the NTL tests + dst_path = join(args.output_dir, 'src', 'interfaces', 'test', 'meson.build') + test_mod_meson_build_text = test_mod_NTL_meson_build % 'NTL-interface' + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, test_mod_meson_build_text) + # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: asm_dir = join(args.output_dir, 'src', path) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index fb81b3588e..375a229e3c 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -1,9 +1,10 @@ -project('FLINT', 'c', +project('FLINT', 'c', 'cpp', version: '3.2.0-dev', license: 'LGPL3+', default_options: [ 'buildtype=release', 'c_std=c11', + 'cpp_std=c++11', ], ) diff --git a/config/meson.build b/config/meson.build index 3ff0b70173..7a2a644ea8 100644 --- a/config/meson.build +++ b/config/meson.build @@ -38,8 +38,6 @@ elif blas_opt.enabled() error('BLAS support is not yet implemented') elif gc_opt.enabled() error('Garbage collection is not yet implemented') -elif ntl_opt.enabled() - error('NTL support is not yet implemented') endif # ----------------------------------------------------------------------------- From 74b94f90cee98a74338f3a21a980da17ea07291d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 14:04:05 +0200 Subject: [PATCH 037/104] Add header dependencies to libflint --- _meson_build/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 375a229e3c..2b2403c326 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -47,7 +47,7 @@ endif # Build include directory after list of all source files is complete subdir('include') -libflint = library('flint', c_files_all, +libflint = library('flint', c_files_all + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], install: true, From 93b843320e51027c38ee5c54b4828f00634a906f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 14:11:28 +0200 Subject: [PATCH 038/104] Update to FLINT 3.5 header files --- _meson_build/generate_meson_build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 2c77ba07ed..0069814761 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -41,6 +41,7 @@ 'acf_types', 'arb_types', 'arf_types', + 'ca_types', 'crt_helpers', 'fmpq_types', 'fmpz_mod_types', @@ -49,6 +50,7 @@ 'fq_types', 'fq_zech_types', 'gettimeofday', + 'gr_types', 'limb_types', 'longlong', 'longlong_asm_clang', @@ -58,7 +60,6 @@ 'longlong_msc_arm64', 'longlong_msc_x86', 'machine_vectors', - 'mpf-impl', 'mpoly_types', 'n_poly_types', 'nmod_types', From 6878b4c3550bddf9645417c74b580072bd4e47a3 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 14:13:55 +0200 Subject: [PATCH 039/104] Copy executable bit for ./configure --- _meson_build/generate_meson_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 0069814761..63a831b8a3 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -1,7 +1,7 @@ import sys from os import listdir, makedirs from os.path import join, dirname, abspath, isdir -from shutil import copyfile +from shutil import copy2 from argparse import ArgumentParser this_dir = dirname(abspath(__file__)) @@ -386,7 +386,7 @@ def write_file(dst_path, text): def copy_file(src_path, dst_path): makedirs(dirname(dst_path), exist_ok=True) - copyfile(src_path, dst_path) + copy2(src_path, dst_path) def same_files(src_path, dst_path): From 886955ec1c48dc4c6ecb347a4b08516dbd35ea62 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 14:23:53 +0200 Subject: [PATCH 040/104] Detect FLINT_BITS by compiling with GMP --- config/meson.build | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/meson.build b/config/meson.build index 7a2a644ea8..4b40576fe1 100644 --- a/config/meson.build +++ b/config/meson.build @@ -77,6 +77,21 @@ gmp_long_long_limb = cc.compiles(''' #endif ''') +if gmp_long_long_limb + cfg_data.set('FLINT_LONG_LONG', 1, + description: 'Define to use long long limbs') +endif + +gmp_64_bit_limb = cc.compiles(''' +#include +#if GMP_LIMB_BITS != 64 +# error GMP_LIMB_BITS != 64 +#endif +''', dependencies: gmp_dep, name: 'GMP_LIMB_BITS is 64') + +cfg_data.set('FLINT_BITS', gmp_64_bit_limb ? 64 : 32, + description: 'Define according to the ABI FLINT was compiled with') + # We need to check with cc.links rather than cc.has_function etc because we # are checking if we can link symbols not in the headers. From ecd216fcdecf7ab2508b1cf625ca57995ed88de6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 14:35:15 +0200 Subject: [PATCH 041/104] Add compiler pragmas in meson configuration --- config/meson.build | 99 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/config/meson.build b/config/meson.build index 4b40576fe1..e27435b213 100644 --- a/config/meson.build +++ b/config/meson.build @@ -719,6 +719,105 @@ if pretty_tests_opt.enabled() description: 'Define to enable pretty printing for tests.') endif +# ----------------------------------------------------------------------------- +# compiler pragmas +# ----------------------------------------------------------------------------- + +pragma_compiler = '' +if cc.get_id() == 'clang' + pragma_compiler = 'clang' +elif cc.get_id() == 'gcc' + pragma_compiler = 'GCC' +endif + +pragma_checks = { + 'DIAGNOSTIC_PUSH': [ + 'diagnostic push', + '', + ], + 'DIAGNOSTIC_POP': [ + 'diagnostic pop', + 'diagnostic push', + ], + 'DIAGNOSTIC_IGNORE_INCOMPATIBLE_FUNCTION_POINTER_TYPES': [ + 'diagnostic ignored \\"-Wincompatible-function-pointer-types\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_DISCARDED_QUALIFIERS': [ + 'diagnostic ignored \\"-Wdiscarded-qualifiers\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_FORMAT': [ + 'diagnostic ignored \\"-Wformat\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_DANGLING_POINTER': [ + 'diagnostic ignored \\"-Wdangling-pointer\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_CAST_FUNCTION_TYPE': [ + 'diagnostic ignored \\"-Wcast-function-type\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_OVERLENGTH_STRINGS': [ + 'diagnostic ignored \\"-Woverlength-strings\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_UNUSED_VARIABLE': [ + 'diagnostic ignored \\"-Wunused-variable\\"', + '', + ], + 'DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED': [ + 'diagnostic ignored \\"-Wmaybe-uninitialized\\"', + '', + ], + 'PUSH_OPTIONS': [ + 'push_options', + '', + ], + 'POP_OPTIONS': [ + 'pop_options', + 'push_options', + ], + 'OPTIMIZE_O2': [ + 'optimize (\\"O2\\")', + '', + ], + 'OPTIMIZE_OSIZE': [ + 'optimize (\\"Os\\")', + '', + ], + 'OPTIMIZE_UNROLL_LOOPS': [ + 'optimize (\\"unroll-loops\\")', + '', + ], +} + +foreach macro_name, pragma_info : pragma_checks + cfg_data.set(macro_name, '', + description: 'Define to the corresponding compiler pragma if supported.') + + if pragma_compiler != '' + pragma = pragma_info[0] + pre_pragma = pragma_info[1] + pragma_value = '_Pragma("@0@ @1@")'.format(pragma_compiler, pragma) + pragma_test = '' + + if pre_pragma != '' + pragma_test += '_Pragma("@0@ @1@")\n'.format(pragma_compiler, pre_pragma) + endif + + pragma_test += pragma_value + '\nint main(void) { return 0; }\n' + + if cc.compiles(pragma_test, + args: ['-Werror', '-Wunknown-pragmas'], + name: macro_name + ' pragma') + cfg_data.set(macro_name, pragma_value, + description: 'Define to the corresponding compiler pragma if supported.') + endif + endif +endforeach + # ----------------------------------------------------------------------------- # internal configuration for config.h # ----------------------------------------------------------------------------- From c2c49360a65092feb0e247556734d80e75d474a2 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 16:17:20 +0200 Subject: [PATCH 042/104] Set minimum meson version --- _meson_build/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 2b2403c326..d526105a9f 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -1,6 +1,7 @@ project('FLINT', 'c', 'cpp', version: '3.2.0-dev', license: 'LGPL3+', + meson_version: '>=1.1.0', default_options: [ 'buildtype=release', 'c_std=c11', From 3fe07758e260e65600f651ae49e408a84485c5dd Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 16:34:28 +0200 Subject: [PATCH 043/104] Update exact CPU checking in meson --- config/meson.build | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/config/meson.build b/config/meson.build index e27435b213..5bbf4a8391 100644 --- a/config/meson.build +++ b/config/meson.build @@ -244,6 +244,7 @@ X86_64_ADX_CPU_NAMES = [ 'zen2', 'zen3', 'zen4', + 'zen5', 'coreibwl', 'broadwell', 'skylake', @@ -256,6 +257,7 @@ X86_64_ADX_CPU_NAMES = [ 'tigerlake', 'alderlake', 'raptorlake', + 'meteorlake', 'knightslanding', 'sapphirerapids', 'cometlake', @@ -384,12 +386,17 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES elif exact_cpu == 'zen4' gcc_cflags_arch = '-march=znver4' - param_path = 'x86_64/zen3' + param_path = 'x86_64/zen4' + have_avx512 = 'yes' + + elif exact_cpu == 'zen5' + gcc_cflags_arch = '-march=znver5 -march=znver4' + param_path = 'x86_64/zen4' have_avx512 = 'yes' elif exact_cpu in ['coreibwl', 'broadwell'] gcc_cflags_arch = '-march=broadwell' - param_path = 'x86_64/skylake' + param_path = 'x86_64/broadwell' elif exact_cpu == 'skylake' gcc_cflags_arch = '-march=skylake' @@ -402,7 +409,7 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES elif exact_cpu == 'cannonlake' gcc_cflags_arch = '-march=cannonlake' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' have_avx512 = 'yes' elif exact_cpu == 'kabylake' @@ -411,31 +418,35 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES elif exact_cpu == 'icelake' gcc_cflags_arch = '-march=icelake-client' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' have_avx512 = 'yes' elif exact_cpu == 'icelake_server' gcc_cflags_arch = '-march=icelake-server' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' have_avx512 = 'yes' elif exact_cpu == 'rocketlake' gcc_cflags_arch = '-march=rocketlake' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' have_avx512 = 'yes' elif exact_cpu == 'tigerlake' gcc_cflags_arch = '-march=tigerlake' - param_path = 'x86_64/skylake' + param_path = 'x86_64/tigerlake' have_avx512 = 'yes' elif exact_cpu == 'alderlake' gcc_cflags_arch = '-march=alderlake' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' elif exact_cpu == 'raptorlake' - gcc_cflags_arch = '-march=alderlake' - param_path = 'x86_64/skylake' + gcc_cflags_arch = '-march=raptorlake -march=alderlake' + param_path = 'x86_64/raptorlake' + + elif exact_cpu == 'meteorlake' + gcc_cflags_arch = '-march=meteorlake -march=alderlake' + param_path = 'x86_64/meteorlake' elif exact_cpu == 'knightslanding' gcc_cflags_arch = '-march=knl' @@ -443,7 +454,7 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES elif exact_cpu == 'sapphirerapids' gcc_cflags_arch = '-march=sapphirerapids' - param_path = 'x86_64/skylake' + param_path = 'x86_64/icelake' have_avx512 = 'yes' elif exact_cpu == 'cometlake' From 97a8e823f807b3f37f7e446e773cd9ba13191fd1 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 16:42:00 +0200 Subject: [PATCH 044/104] Only use assembly for 64 bit machines --- config/meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/meson.build b/config/meson.build index 5bbf4a8391..facd642f11 100644 --- a/config/meson.build +++ b/config/meson.build @@ -89,7 +89,9 @@ gmp_64_bit_limb = cc.compiles(''' #endif ''', dependencies: gmp_dep, name: 'GMP_LIMB_BITS is 64') -cfg_data.set('FLINT_BITS', gmp_64_bit_limb ? 64 : 32, +flint_bits = gmp_64_bit_limb ? 64 : 32 + +cfg_data.set('FLINT_BITS', flint_bits, description: 'Define according to the ABI FLINT was compiled with') # We need to check with cc.links rather than cc.has_function etc because we @@ -607,7 +609,7 @@ message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') # Assembly # ----------------------------------------------------------------------------- -if asm_path != '' +if asm_path != '' and flint_bits == 64 assembly_cpu_supported = true assembly_dir = 'mpn_extras/' + asm_path if host_machine.cpu_family() == 'aarch64' From 758536ab918570e9ee45ef99f80728b89dce152e Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 16:57:41 +0200 Subject: [PATCH 045/104] Fix versions specified in the meson build --- _meson_build/meson.build | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index d526105a9f..0b3fb8a119 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -1,5 +1,5 @@ project('FLINT', 'c', 'cpp', - version: '3.2.0-dev', + version: '3.6.0-dev', license: 'LGPL3+', meson_version: '>=1.1.0', default_options: [ @@ -11,8 +11,12 @@ project('FLINT', 'c', 'cpp', FLINT_MAJOR = meson.project_version().split('.')[0] FLINT_MINOR = meson.project_version().split('.')[1] -FLINT_PATCH = meson.project_version().split('.')[2] +FLINT_PATCH = meson.project_version().split('.')[2].split('-')[0] FLINT_VERSION_FULL = meson.project_version() +FLINT_MAJOR_SO = '24' +FLINT_MINOR_SO = '0' +FLINT_PATCH_SO = '0' +FLINT_LIBRARY_VERSION = '.'.join([FLINT_MAJOR_SO, FLINT_MINOR_SO, FLINT_PATCH_SO]) cc = meson.get_compiler('c') fs = import('fs') @@ -52,6 +56,8 @@ libflint = library('flint', c_files_all + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], install: true, + version: FLINT_LIBRARY_VERSION, + soversion: FLINT_MAJOR_SO, c_args: [ '-DBUILDING_FLINT', '-DFLINT_NOSTDIO', @@ -72,7 +78,7 @@ endif pkg_mod = import('pkgconfig') pkg_mod.generate( libraries: libflint, - version : '3.1.0', + version : meson.project_version(), name: 'flint', filebase: 'flint', description: 'Fast Library for Number Theory' From 5ee526cd2e5726b2a141fd0b5b2c9146ae363460 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 17:21:36 +0200 Subject: [PATCH 046/104] Pass CPU-specific compiler flags through --- _meson_build/meson.build | 2 +- config/meson.build | 43 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 0b3fb8a119..314826bf49 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -62,7 +62,7 @@ libflint = library('flint', c_files_all + headers_all, '-DBUILDING_FLINT', '-DFLINT_NOSTDIO', '-DFLINT_NOSTDARG', - ] + ] + flint_cpu_c_args ) tests_opt = get_option('tests') diff --git a/config/meson.build b/config/meson.build index facd642f11..df955a9797 100644 --- a/config/meson.build +++ b/config/meson.build @@ -222,6 +222,10 @@ message('EXACT CPU:', exact_cpu) gcc_cflags = '-O3 -pedantic -std=c11' gcc_warnings = '-Werror=implicit-function-declaration -Wall -Wno-stringop-overread -Wno-stringop-overflow' +gcc_cflags_optlist = '' +gcc_cflags_arch = '' +gcc_cflags_tune = '' +flint_cpu_c_args = [] # We only try to provide specifics for those systems that currently supports # our assembly routines. If more combinations are wished for than what is @@ -349,6 +353,10 @@ if host_machine.cpu_family() == 'aarch64' gcc_cflags_arch = '-march=armv8.6-a' gcc_cflags_tune = '' + elif exact_cpu.startswith('applem4') + gcc_cflags_arch = '-march=armv8.7-a' + gcc_cflags_tune = '' + elif exact_cpu.startswith('aarch64') or exact_cpu.startswith('armv8') gcc_cflags_arch = '-march=armv8-a' gcc_cflags_tune = '' @@ -482,7 +490,7 @@ elif host_machine.cpu_family() == 'x86_64' and exact_cpu in X86_64_ADX_CPU_NAMES elif host_machine.cpu_family() == 'x86_64' # NOTE: We do not care if the user specifies noavx! - gcc_cflags = '$gcc_cflags' + gcc_cflags = gcc_cflags gcc_cflags_optlist = 'arch' asm_path = '' param_path = 'x86_64' @@ -543,6 +551,31 @@ else endif +# Probe and collect CPU-specific compiler flags. For architecture flags, the +# autotools build treats a whitespace-separated list as ordered fallbacks. +foreach opt : gcc_cflags_optlist.split() + candidate_flags = get_variable('gcc_cflags_' + opt, '').split() + found_single = false + + foreach flag : candidate_flags + if found_single + break + endif + + if cc.has_argument(flag) + flint_cpu_c_args += flag + if opt == 'arch' + found_single = true + endif + elif opt == 'arch' + flint_cv_have_fft_small_x86_i = 'no' + flint_cv_have_fft_small_arm_i = 'no' + endif + endforeach +endforeach + +message('CPU-specific C arguments:', ' '.join(flint_cpu_c_args)) + # ----------------------------------------------------------------------------- # mparam # ----------------------------------------------------------------------------- @@ -586,12 +619,16 @@ int main(){return 0;} if host_machine.cpu_family() == 'aarch64' fft_small_supported = ( flint_cv_have_fft_small_arm_i == 'yes' - and cc.compiles(fft_small_arm_code, dependencies: gmp_dep) + and cc.compiles(fft_small_arm_code, + args: flint_cpu_c_args, + dependencies: gmp_dep) ) else fft_small_supported = ( flint_cv_have_fft_small_x86_i == 'yes' - and cc.compiles(fft_small_x86_code, dependencies: gmp_dep) + and cc.compiles(fft_small_x86_code, + args: flint_cpu_c_args, + dependencies: gmp_dep) ) endif From 7599d59dbb41f757187c92fa3bfc67e8ebef2648 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 17:36:57 +0200 Subject: [PATCH 047/104] Add GMP full link argument --- _meson_build/meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 314826bf49..91ca38639b 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -26,7 +26,13 @@ m_dep = cc.find_library('m', required: false) gmp_dep = dependency('gmp', version: '>= 6.2.1') mpfr_dep = dependency('mpfr', version: '>= 4.1.0') -flint_deps = [gmp_dep, mpfr_dep, m_dep] +gmp_libdir = gmp_dep.get_variable(pkgconfig: 'libdir') +gmp_link_dep = declare_dependency( + dependencies: gmp_dep, + link_args: ['-L' + gmp_libdir], +) + +flint_deps = [gmp_link_dep, mpfr_dep, m_dep] add_project_arguments( '-Werror=implicit-function-declaration', From 4531b93711388cf07a5402ffa30aa88b2e0c9752 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 17:52:45 +0200 Subject: [PATCH 048/104] Fix AVX and assembly handling in meson build --- _meson_build/generate_meson_build.py | 8 ++----- _meson_build/meson.build | 13 +++++++++++ config/meson.build | 35 ++++++++++++++++++++++++---- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 63a831b8a3..931e8624e5 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -176,9 +176,7 @@ test_exe = executable('main', 'main.c', - dependencies: flint_deps, - link_with: libflint, - include_directories: [headers_built_nodir_inc, '../..'], + dependencies: [flint_test_dep], install: false, ) @@ -199,9 +197,7 @@ test_exe = executable('main', 't-NTL-interface.cpp', - dependencies: flint_deps + [ntl_dep], - link_with: libflint, - include_directories: [headers_built_nodir_inc, '../..'], + dependencies: [flint_test_dep, ntl_dep], install: false, ) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 91ca38639b..2792f47e68 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -27,6 +27,8 @@ gmp_dep = dependency('gmp', version: '>= 6.2.1') mpfr_dep = dependency('mpfr', version: '>= 4.1.0') gmp_libdir = gmp_dep.get_variable(pkgconfig: 'libdir') +gmp_incdir = gmp_dep.get_variable(pkgconfig: 'includedir') +mpfr_incdir = mpfr_dep.get_variable(pkgconfig: 'includedir') gmp_link_dep = declare_dependency( dependencies: gmp_dep, link_args: ['-L' + gmp_libdir], @@ -71,6 +73,17 @@ libflint = library('flint', c_files_all + headers_all, ] + flint_cpu_c_args ) +flint_test_dep = declare_dependency( + link_with: libflint, + dependencies: flint_deps, + include_directories: [ + headers_built_nodir_inc, + 'src', + include_directories(gmp_incdir), + include_directories(mpfr_incdir), + ], +) + tests_opt = get_option('tests') if tests_opt.enabled() foreach mod_test : mod_tests diff --git a/config/meson.build b/config/meson.build index df955a9797..288f2a48a1 100644 --- a/config/meson.build +++ b/config/meson.build @@ -30,11 +30,7 @@ coverage_opt = get_option('b_coverage') # Unsupported options # ----------------------------------------------------------------------------- -if avx2_opt.enabled() - error('AVX2 support is not yet implemented') -elif avx512_opt.enabled() - error('AVX512 support is not yet implemented') -elif blas_opt.enabled() +if blas_opt.enabled() error('BLAS support is not yet implemented') elif gc_opt.enabled() error('Garbage collection is not yet implemented') @@ -574,6 +570,30 @@ foreach opt : gcc_cflags_optlist.split() endforeach endforeach +if avx2_opt.enabled() + if host_machine.cpu_family() != 'x86_64' + error('AVX2 is only supported for x86_64 builds') + endif + if not cc.has_argument('-mavx2') + error(meson.get_compiler('c').get_id() + ' does not support -mavx2') + endif + flint_cpu_c_args += '-mavx2' + if cc.has_argument('-mfma') + flint_cpu_c_args += '-mfma' + endif + flint_cv_have_fft_small_x86_i = 'yes' +endif + +if avx512_opt.enabled() + if host_machine.cpu_family() != 'x86_64' + error('AVX512 is only supported for x86_64 builds') + endif + if not cc.has_argument('-mavx512f') + error(meson.get_compiler('c').get_id() + ' does not support -mavx512f') + endif + flint_cpu_c_args += '-mavx512f' +endif + message('CPU-specific C arguments:', ' '.join(flint_cpu_c_args)) # ----------------------------------------------------------------------------- @@ -711,6 +731,11 @@ elif have_assembly and FLINT_HAVE_ASSEMBLY == 'x86_64_adx' description: 'Define if x86_64 ADX assembly is available') endif +if have_assembly + cfg_data.set('FLINT_WANT_ASSEMBLY', 1, + description: 'Define to enable inline assembly.') +endif + if have_fft_small cfg_data.set('FLINT_HAVE_FFT_SMALL', 1, description: 'Define to use the fft_small module') From 615eb31efc9253f7e558ff1cd62db3ca12ea3a92 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 17:59:35 +0200 Subject: [PATCH 049/104] Add ABI option to the meson build --- _meson_build/meson.build | 4 ++++ _meson_build/meson.options | 2 ++ config/meson.build | 23 ++++++++++++++++++----- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 2792f47e68..6bb5df79cb 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -42,6 +42,10 @@ add_project_arguments( ) subdir('config') + +add_project_arguments(flint_abi_c_args, language: ['c', 'cpp']) +add_project_link_arguments(flint_abi_c_args, language: ['c', 'cpp']) + subdir('src') if have_assembly diff --git a/_meson_build/meson.options b/_meson_build/meson.options index dbaa7eaaaf..d5a3a7bae3 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -8,6 +8,8 @@ option('reentrant', type : 'feature', value : 'disabled', description: 'Build the reentrant module') option('thread_safe', type : 'feature', value : 'enabled', description: 'Build the threadsafe module') +option('abi', type : 'combo', choices : ['auto', '32', '64'], value : 'auto', + description: 'Target ABI') option('assert', type : 'feature', value : 'disabled', description: 'Enable assertions') option('pretty_tests', type : 'feature', value : 'enabled', diff --git a/config/meson.build b/config/meson.build index 288f2a48a1..0d7c4db764 100644 --- a/config/meson.build +++ b/config/meson.build @@ -14,6 +14,7 @@ libtool_lock_opt = get_option('libtool_lock') pthread_opt = get_option('pthread') reentrant_opt = get_option('reentrant') thread_safe_opt = get_option('thread_safe') +abi_opt = get_option('abi') assert_opt = get_option('assert') pretty_tests_opt = get_option('pretty_tests') gmp_internals_opt = get_option('gmp_internals') @@ -78,14 +79,24 @@ if gmp_long_long_limb description: 'Define to use long long limbs') endif +flint_abi_c_args = [] +if abi_opt != 'auto' + abi_flag = '-m' + abi_opt + if not cc.has_argument(abi_flag) + error(meson.get_compiler('c').get_id() + ' does not support ' + abi_flag) + endif + flint_abi_c_args += abi_flag + flint_bits = abi_opt == '64' ? 64 : 32 +else gmp_64_bit_limb = cc.compiles(''' #include #if GMP_LIMB_BITS != 64 # error GMP_LIMB_BITS != 64 #endif -''', dependencies: gmp_dep, name: 'GMP_LIMB_BITS is 64') +''', args: flint_abi_c_args, dependencies: gmp_dep, name: 'GMP_LIMB_BITS is 64') flint_bits = gmp_64_bit_limb ? 64 : 32 +endif cfg_data.set('FLINT_BITS', flint_bits, description: 'Define according to the ABI FLINT was compiled with') @@ -104,6 +115,8 @@ int main() { } ''' +gmp_abi_error_suffix = abi_opt == 'auto' ? '' : ' for ABI ' + abi_opt + ' (check that GMP/MPFR are built for this ABI)' + gmp_base_tests = { 'mpz_init': ['', 'mpz_t x; __gmpz_init(x);'], 'mpn_mul_basecase': [ @@ -114,9 +127,9 @@ gmp_base_tests = { foreach name, snippets : gmp_base_tests _code = gmp_test_code.format(snippets[0], snippets[1]) - if not cc.links(_code, dependencies: gmp_dep, name: name + ' links') + if not cc.links(_code, args: flint_abi_c_args, dependencies: gmp_dep, name: name + ' links') message('This code did not link with -lgmp: ', _code) - error('GMP does not have ' + name) + error('GMP does not have ' + name + gmp_abi_error_suffix) endif endforeach @@ -132,10 +145,10 @@ if gmp_internals_opt.allowed() foreach name, snippets : gmp_internals_required _code = gmp_test_code.format(snippets[0], snippets[1]) - if not cc.links(_code, dependencies: gmp_dep, name: name + ' links') + if not cc.links(_code, args: flint_abi_c_args, dependencies: gmp_dep, name: name + ' links') message('This code did not link with -lgmp: ', _code) # Maybe disable gmp_internals rather than error? - error('GMP does not have ' + name) + error('GMP does not have ' + name + gmp_abi_error_suffix) endif endforeach From c25bf8c7a759d076d7775d5ea42b9229120f4a51 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 18:36:23 +0200 Subject: [PATCH 050/104] Add BLAS option to meson build --- _meson_build/meson.build | 16 ++++------- config/meson.build | 59 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 13 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 6bb5df79cb..c82374b8d3 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -27,15 +27,11 @@ gmp_dep = dependency('gmp', version: '>= 6.2.1') mpfr_dep = dependency('mpfr', version: '>= 4.1.0') gmp_libdir = gmp_dep.get_variable(pkgconfig: 'libdir') -gmp_incdir = gmp_dep.get_variable(pkgconfig: 'includedir') -mpfr_incdir = mpfr_dep.get_variable(pkgconfig: 'includedir') gmp_link_dep = declare_dependency( dependencies: gmp_dep, link_args: ['-L' + gmp_libdir], ) -flint_deps = [gmp_link_dep, mpfr_dep, m_dep] - add_project_arguments( '-Werror=implicit-function-declaration', language: 'c', @@ -43,6 +39,11 @@ add_project_arguments( subdir('config') +flint_deps = [gmp_link_dep, mpfr_dep, m_dep] +if have_blas + flint_deps += blas_dep +endif + add_project_arguments(flint_abi_c_args, language: ['c', 'cpp']) add_project_link_arguments(flint_abi_c_args, language: ['c', 'cpp']) @@ -80,12 +81,7 @@ libflint = library('flint', c_files_all + headers_all, flint_test_dep = declare_dependency( link_with: libflint, dependencies: flint_deps, - include_directories: [ - headers_built_nodir_inc, - 'src', - include_directories(gmp_incdir), - include_directories(mpfr_incdir), - ], + include_directories: [headers_built_nodir_inc, 'src'], ) tests_opt = get_option('tests') diff --git a/config/meson.build b/config/meson.build index 0d7c4db764..dbeefa2122 100644 --- a/config/meson.build +++ b/config/meson.build @@ -31,9 +31,7 @@ coverage_opt = get_option('b_coverage') # Unsupported options # ----------------------------------------------------------------------------- -if blas_opt.enabled() - error('BLAS support is not yet implemented') -elif gc_opt.enabled() +if gc_opt.enabled() error('Garbage collection is not yet implemented') endif @@ -63,6 +61,61 @@ if not cc.has_function('atan2', dependencies: m_dep) error('libm is required') endif +# ----------------------------------------------------------------------------- +# BLAS +# ----------------------------------------------------------------------------- + +blas_dep = declare_dependency() +have_blas = false + +if not blas_opt.disabled() + blas_candidates = [ + dependency('cblas', required: false), + dependency('openblas', required: false), + ] + + foreach dep : blas_candidates + if dep.found() + dep_has_cblas_h = cc.has_header('cblas.h', dependencies: dep) + dep_has_cblas_dgemm = dep_has_cblas_h and cc.has_function( + 'cblas_dgemm', + prefix: '#include ', + dependencies: dep) + if dep_has_cblas_dgemm + blas_dep = dep + have_blas = true + break + endif + endif + endforeach + + if not have_blas + foreach libname : ['cblas', 'openblas', 'blas'] + libdep = cc.find_library(libname, required: false) + if libdep.found() + lib_has_cblas_h = cc.has_header('cblas.h') + lib_has_cblas_dgemm = lib_has_cblas_h and cc.has_function( + 'cblas_dgemm', + prefix: '#include ', + dependencies: libdep) + if lib_has_cblas_dgemm + blas_dep = libdep + have_blas = true + break + endif + endif + endforeach + endif + + if blas_opt.enabled() and not have_blas + if not cc.has_header('cblas.h') + error('Could not find cblas.h') + else + error('BLAS library was not found.') + endif + endif +endif + # ----------------------------------------------------------------------------- # GMP # ----------------------------------------------------------------------------- From 3c22b0c5230b47fece29f88d9ecbf51da68f8636 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 18:52:20 +0200 Subject: [PATCH 051/104] Add Boehm GC option to mesno build --- _meson_build/meson.build | 3 ++ config/meson.build | 85 ++++++++++++++++++++++++++++------------ 2 files changed, 62 insertions(+), 26 deletions(-) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index c82374b8d3..8b3f9f69da 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -43,6 +43,9 @@ flint_deps = [gmp_link_dep, mpfr_dep, m_dep] if have_blas flint_deps += blas_dep endif +if have_gc + flint_deps += gc_dep +endif add_project_arguments(flint_abi_c_args, language: ['c', 'cpp']) add_project_link_arguments(flint_abi_c_args, language: ['c', 'cpp']) diff --git a/config/meson.build b/config/meson.build index dbeefa2122..97036320cc 100644 --- a/config/meson.build +++ b/config/meson.build @@ -27,32 +27,6 @@ gc_opt = get_option('gc') ntl_opt = get_option('ntl') coverage_opt = get_option('b_coverage') -# ----------------------------------------------------------------------------- -# Unsupported options -# ----------------------------------------------------------------------------- - -if gc_opt.enabled() - error('Garbage collection is not yet implemented') -endif - -# ----------------------------------------------------------------------------- -# fmpz memory management -# ----------------------------------------------------------------------------- - -if gc_opt.allowed() - if thread_safe_opt.allowed() - error('Garbage collection is not thread safe') - else - fmpz_c_in = 'fmpz_gc.c' - endif -else - if reentrant_opt.enabled() - fmpz_c_in = 'fmpz_reentrant.c' - else - fmpz_c_in = 'fmpz_single.c' - endif -endif - # ----------------------------------------------------------------------------- # libm # ----------------------------------------------------------------------------- @@ -116,6 +90,65 @@ if not blas_opt.disabled() endif endif +# ----------------------------------------------------------------------------- +# Boehm GC +# ----------------------------------------------------------------------------- + +gc_dep = declare_dependency() +have_gc = false + +if not gc_opt.disabled() + gc_candidates = [ + dependency('bdw-gc', required: false), + dependency('gc', required: false), + ] + + foreach dep : gc_candidates + if dep.found() + dep_has_gc_h = cc.has_header('gc.h', dependencies: dep) + if dep_has_gc_h + gc_dep = dep + have_gc = true + break + endif + endif + endforeach + + if not have_gc + libgc_dep = cc.find_library('gc', required: false) + if libgc_dep.found() and cc.has_header('gc.h') + gc_dep = libgc_dep + have_gc = true + endif + endif + + if gc_opt.enabled() and not have_gc + if not cc.has_header('gc.h') + error('Could not find gc.h') + else + error('GC library was not found.') + endif + endif +endif + +# ----------------------------------------------------------------------------- +# fmpz memory management +# ----------------------------------------------------------------------------- + +if gc_opt.enabled() + if thread_safe_opt.enabled() + error('GC does not support TLS.') + else + fmpz_c_in = 'fmpz_gc.c' + endif +else + if reentrant_opt.enabled() + fmpz_c_in = 'fmpz_reentrant.c' + else + fmpz_c_in = 'fmpz_single.c' + endif +endif + # ----------------------------------------------------------------------------- # GMP # ----------------------------------------------------------------------------- From 77969839d96b1f85ce4900f6cc1b4c6048c4eadd Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Tue, 16 Jun 2026 19:13:25 +0200 Subject: [PATCH 052/104] Add NTL option in the meson build --- _meson_build/generate_meson_build.py | 4 -- config/meson.build | 79 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 931e8624e5..b55d3001aa 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -191,10 +191,6 @@ # python _meson_build/generate_meson_build.py # -# NTL no found by pkgconfig -cpp = meson.get_compiler('cpp') -ntl_dep = cpp.find_library('ntl') - test_exe = executable('main', 't-NTL-interface.cpp', dependencies: [flint_test_dep, ntl_dep], diff --git a/config/meson.build b/config/meson.build index 97036320cc..2554b0ed46 100644 --- a/config/meson.build +++ b/config/meson.build @@ -26,6 +26,7 @@ blas_opt = get_option('blas') gc_opt = get_option('gc') ntl_opt = get_option('ntl') coverage_opt = get_option('b_coverage') +cpp = meson.get_compiler('cpp') # ----------------------------------------------------------------------------- # libm @@ -90,6 +91,84 @@ if not blas_opt.disabled() endif endif +# ----------------------------------------------------------------------------- +# NTL +# ----------------------------------------------------------------------------- + +ntl_dep = declare_dependency() +have_ntl = false + +if not ntl_opt.disabled() + ntl_candidates = [ + dependency('ntl', required: false, static: true), + dependency('ntl', required: false), + ] + + foreach dep : ntl_candidates + if dep.found() + dep_has_ntl_h = cpp.has_header('NTL/ZZ.h', dependencies: dep) + dep_links_ntl = dep_has_ntl_h and cpp.links( + ''' + #include + #include + + int main() { + NTL::ZZ a, b, c; + std::cin >> a; + std::cin >> b; + c = (a + 1) * (b + 1); + std::cout << c << "\\n"; + return 0; + } + ''', + dependencies: dep, + name: 'if linking with NTL works') + if dep_links_ntl + ntl_dep = dep + have_ntl = true + break + endif + endif + endforeach + + if not have_ntl + libntl_dep = cpp.find_library('ntl', required: false) + if libntl_dep.found() and cpp.has_header('NTL/ZZ.h') + libntl_full_dep = declare_dependency( + dependencies: [libntl_dep, gmp_link_dep], + ) + lib_links_ntl = cpp.links( + ''' + #include + #include + + int main() { + NTL::ZZ a, b, c; + std::cin >> a; + std::cin >> b; + c = (a + 1) * (b + 1); + std::cout << c << "\\n"; + return 0; + } + ''', + dependencies: libntl_full_dep, + name: 'if linking with NTL works') + if lib_links_ntl + ntl_dep = libntl_full_dep + have_ntl = true + endif + endif + endif + + if ntl_opt.enabled() and not have_ntl + if not cpp.has_header('NTL/ZZ.h') + error('Could not find NTL/ZZ.h') + else + error('NTL library was not found.') + endif + endif +endif + # ----------------------------------------------------------------------------- # Boehm GC # ----------------------------------------------------------------------------- From cce2d3344053270a242e57a561b78ec8c5ca0d73 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 00:21:27 +0200 Subject: [PATCH 053/104] Check manddatory heraders during meson configure --- config/meson.build | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 2554b0ed46..2e122d8a64 100644 --- a/config/meson.build +++ b/config/meson.build @@ -232,12 +232,20 @@ endif # GMP # ----------------------------------------------------------------------------- +if not cc.has_header('gmp.h', dependencies: gmp_dep) + error('Could not find gmp.h') +endif + +if not cc.has_header('mpfr.h', dependencies: mpfr_dep) + error('Could not find mpfr.h') +endif + gmp_long_long_limb = cc.compiles(''' #include #if !defined(_LONG_LONG_LIMB) # error mp_limb_t != unsigned long long int #endif -''') +''', dependencies: gmp_dep) if gmp_long_long_limb cfg_data.set('FLINT_LONG_LONG', 1, @@ -1088,6 +1096,27 @@ if cc.has_header_symbol('stdlib.h', 'aligned_alloc') description: 'Define to 1 if you have the \'aligned_alloc\' function.') endif +mandatory_headers = [ + 'stdarg.h', + 'math.h', + 'float.h', + 'errno.h', +] + +foreach h : mandatory_headers + if not cc.has_header(h) + error('Could not find a mandatory header: ' + h) + endif +endforeach + +if pthread_opt.enabled() and not cc.has_header('pthread.h') + error('Could not find pthread.h') +endif + +if assert_opt.enabled() and not cc.has_header('assert.h') + error('Could not find assert.h') +endif + ac_headers_check = [ 'alloca.h', 'arm_neon.h', From 3db40dfc4c7a43aa6be3654bc215066125d0a578 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 09:59:11 +0200 Subject: [PATCH 054/104] Build tests automatically for meson test --- _meson_build/bad_test.c | 10 ---------- _meson_build/generate_meson_build.py | 2 ++ _meson_build/meson.build | 5 +---- _meson_build/meson.options | 4 ++-- 4 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 _meson_build/bad_test.c diff --git a/_meson_build/bad_test.c b/_meson_build/bad_test.c deleted file mode 100644 index 3af1103e33..0000000000 --- a/_meson_build/bad_test.c +++ /dev/null @@ -1,10 +0,0 @@ -/* - * This is used to fail the build tests of someone tries to run them without - * enabling them in the build first. - */ -#include - -int main() { - printf("No tests run. Need to enable building tests with meson configure -Dtests=enabled\n"); - return 1; -} diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index b55d3001aa..9353b29246 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -178,6 +178,7 @@ 'main.c', dependencies: [flint_test_dep], install: false, + build_by_default: tests_opt.enabled(), ) test('%s', test_exe) @@ -195,6 +196,7 @@ 't-NTL-interface.cpp', dependencies: [flint_test_dep, ntl_dep], install: false, + build_by_default: tests_opt.enabled(), ) test('%s', test_exe) diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 8b3f9f69da..39c68c6da9 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -88,13 +88,10 @@ flint_test_dep = declare_dependency( ) tests_opt = get_option('tests') -if tests_opt.enabled() +if not tests_opt.disabled() foreach mod_test : mod_tests subdir('src' / mod_test) endforeach -else - bad_test_exe = executable('bad_test', '_meson_build/bad_test.c') - test('Need to build tests with -Dtests=enabled', bad_test_exe) endif pkg_mod = import('pkgconfig') diff --git a/_meson_build/meson.options b/_meson_build/meson.options index d5a3a7bae3..bba377511c 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -1,5 +1,5 @@ -option('tests', type : 'feature', value : 'disabled', - description: 'Build the tests') +option('tests', type : 'feature', value : 'auto', + description: 'Configure tests; enabled also builds them by default') option('libtool_lock', type : 'feature', value : 'enabled', description: 'Use libtool lock') option('pthread', type : 'feature', value : 'enabled', From 41795e086ed6103bf6f12e065ce135679648e8cd Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 10:26:30 +0200 Subject: [PATCH 055/104] Update notes about missing options in meson build --- _meson_build/meson.options | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/_meson_build/meson.options b/_meson_build/meson.options index bba377511c..7880354975 100644 --- a/_meson_build/meson.options +++ b/_meson_build/meson.options @@ -30,11 +30,13 @@ option('gc', type : 'feature', value : 'disabled', description: 'Use the Boehm garbage collector') option('ntl', type : 'feature', value : 'disabled', description: 'Use NTL (in tests)') -# Not included from original configure: -# coverage -Db_coverage=true -# debug -# dependency_tracking -# with-pic +# Autotools options covered by Meson built-ins: +# coverage: -Db_coverage=true +# debug: -Ddebug=true or -Dbuildtype=debug +# with-pic: -Db_staticpic=true/false +# with-sysroot: machine-file sys_root or compiler/pkg-config environment +# with-gnu-ld: linker selection via compiler/native/cross file +# dependency_tracking: handled by Meson/Ninja +# +# Not currently mirrored: # with-aix-soname -# with-gnu-ld -# with-sysroot From 8c167ff29007afec977732ba3f6aba4280268542 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 11:31:39 +0200 Subject: [PATCH 056/104] Remove stale comments --- _meson_build/generate_meson_build.py | 2 +- config/meson.build | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 9353b29246..13f3c30978 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -86,7 +86,7 @@ 'fq_zech_mpoly_factor', 'generic_files', 'hypgeom', - # XXX: Templates... + # Template tests are included by the concrete fq_nmod/fq_zech modules. 'fq_templates', 'fq_embed_templates', 'fq_poly_templates', diff --git a/config/meson.build b/config/meson.build index 2e122d8a64..3fc7481a1b 100644 --- a/config/meson.build +++ b/config/meson.build @@ -320,7 +320,8 @@ if gmp_internals_opt.allowed() _code = gmp_test_code.format(snippets[0], snippets[1]) if not cc.links(_code, args: flint_abi_c_args, dependencies: gmp_dep, name: name + ' links') message('This code did not link with -lgmp: ', _code) - # Maybe disable gmp_internals rather than error? + # Match autotools: GMP internals are enabled by default and these symbols + # are required unless -Dgmp_internals=disabled is used. error('GMP does not have ' + name + gmp_abi_error_suffix) endif endforeach @@ -366,7 +367,7 @@ if gmp_internals_opt.allowed() foreach name, snippets : gmp_internals_optional _code = gmp_test_code.format(snippets[0], snippets[1]) - if cc.links(_code, dependencies: gmp_dep, name: name + ' links') + if cc.links(_code, args: flint_abi_c_args, dependencies: gmp_dep, name: name + ' links') cfg_data.set('FLINT_HAVE_NATIVE_' + name, 1, description: 'Define if GMP has ' + name) endif @@ -1124,7 +1125,6 @@ ac_headers_check = [ 'errno.h', 'fenv.h', 'float.h', - 'immintrin.h', # XXX: has_header is not equivalent to autotools check... 'inttypes.h', 'malloc.h', 'math.h', @@ -1175,5 +1175,3 @@ cfg_data_internal.set('STDC_HEADERS', 1, description: '''Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it.''') - -# XXX: set WORDS_BIGENDIAN or undef inline here? From d4dae7bf1af7362ad70bdfbd22276c431fa9c65f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 11:34:10 +0200 Subject: [PATCH 057/104] Add check for _alligned_malloc in meson build --- config/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/meson.build b/config/meson.build index 3fc7481a1b..eccf4e6d5c 100644 --- a/config/meson.build +++ b/config/meson.build @@ -1097,6 +1097,11 @@ if cc.has_header_symbol('stdlib.h', 'aligned_alloc') description: 'Define to 1 if you have the \'aligned_alloc\' function.') endif +if cc.has_function('_aligned_malloc', prefix: '#include ') + cfg_data_internal.set('HAVE__ALIGNED_MALLOC', 1, + description: 'Define to 1 if you have the \'_aligned_malloc\' function.') +endif + mandatory_headers = [ 'stdarg.h', 'math.h', @@ -1149,8 +1154,6 @@ foreach h : ac_headers_check endif endforeach -# XXX: Do we need to check for _alligned_malloc? - # XXX: Need better checking for LSYM_PREFIX and related assembly options cfg_data_internal.set_quoted('LSYM_PREFIX', 'L', description: 'Assembler local label prefix') From e05d6914f27c586400d529bb21ab6489173786f4 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 14:03:15 +0200 Subject: [PATCH 058/104] Add asm syntax detection in the meson build --- _meson_build/check_assembly.py | 290 +++++++++++++++++++++++++++ _meson_build/config.m4.in | 28 +-- _meson_build/generate_meson_build.py | 2 +- _meson_build/meson.build | 2 +- config/meson.build | 116 ++++++++++- 5 files changed, 419 insertions(+), 19 deletions(-) create mode 100644 _meson_build/check_assembly.py diff --git a/_meson_build/check_assembly.py b/_meson_build/check_assembly.py new file mode 100644 index 0000000000..ef129cf96c --- /dev/null +++ b/_meson_build/check_assembly.py @@ -0,0 +1,290 @@ +#!/usr/bin/env python3 + +import argparse +import re +import shutil +import subprocess +import sys +import tempfile +from pathlib import Path + + +def run(cmd, *, cwd=None, input_text=None): + return subprocess.run( + cmd, + cwd=cwd, + input=input_text, + text=True, + capture_output=True, + check=False, + ) + + +def compile_asm(compiler, c_args, asm_text): + tmpdir = Path(tempfile.mkdtemp(prefix='flint-asm-')) + asm_file = tmpdir / 'probe.s' + obj_file = tmpdir / 'probe.o' + asm_file.write_text(asm_text) + proc = run(list(compiler) + list(c_args) + ['-c', str(asm_file), '-o', str(obj_file)]) + return proc, obj_file if proc.returncode == 0 else None + + +def compile_c_to_asm(compiler, c_args, c_text): + tmpdir = Path(tempfile.mkdtemp(prefix='flint-c-')) + c_file = tmpdir / 'probe.c' + s_file = tmpdir / 'probe.s' + c_file.write_text(c_text) + proc = run(list(compiler) + list(c_args) + ['-S', str(c_file), '-o', str(s_file)]) + return proc, s_file if proc.returncode == 0 else None + + +def nm_output(obj_file): + nm = shutil.which('nm') + if nm is None: + return None + proc = run([nm, str(obj_file)]) + if proc.returncode != 0: + return None + return proc.stdout + + +def probe_asm_candidate(compiler, c_args, asm_text): + proc, _ = compile_asm(compiler, c_args, asm_text) + return proc.returncode == 0 + + +def detect_text(compiler, c_args): + for candidate in ['.text', '.code', '.csect .text[PR]']: + if probe_asm_candidate(compiler, c_args, f'{candidate}\n'): + return candidate + return '.text' + + +def detect_data(compiler, c_args): + for candidate in ['.data', '.csect .data[RW]']: + if probe_asm_candidate(compiler, c_args, f'{candidate}\n'): + return candidate + return '.data' + + +def detect_label_suffix(compiler, c_args, text_dir): + for candidate in ['', ':']: + asm = f'''{text_dir} +foo{candidate} + .byte 0 +''' + if probe_asm_candidate(compiler, c_args, asm): + return candidate + return ':' + + +def detect_gsym_prefix(compiler, c_args, host_system): + default = '_' if host_system == 'darwin' else '' + with tempfile.TemporaryDirectory() as tmp: + tmpdir = Path(tmp) + c_file = tmpdir / 'probe.c' + obj_file = tmpdir / 'probe.o' + c_file.write_text('int gurkmacka;\n') + proc = run(list(compiler) + list(c_args) + ['-c', str(c_file), '-o', str(obj_file)]) + if proc.returncode != 0: + return default + out = nm_output(obj_file) + if out is None: + return default + for line in out.splitlines(): + if 'gurkmacka' not in line: + continue + symbol = line.split()[-1] + if symbol == '_gurkmacka': + return '_' + if symbol == 'gurkmacka': + return '' + return default + + +def detect_lsym_prefix(compiler, c_args, text_dir, label_suffix, gsym_prefix): + candidates = ['L', '.L', '$', 'L$'] + with tempfile.TemporaryDirectory() as tmp: + tmpdir = Path(tmp) + for candidate in candidates: + asm_file = tmpdir / 'probe.s' + obj_file = tmpdir / 'probe.o' + asm_file.write_text(f'''{text_dir} +dummy{label_suffix} +{candidate}gurkmacka{label_suffix} +''') + proc = run(list(compiler) + list(c_args) + ['-c', str(asm_file), '-o', str(obj_file)]) + if proc.returncode != 0: + continue + out = nm_output(obj_file) + if out is None: + continue + if 'gurkmacka' not in out: + return candidate + for line in out.splitlines(): + if 'gurkmacka' not in line: + continue + fields = line.split() + if len(fields) >= 2 and fields[1] in ['t', 'T', 'n', 'N']: + return candidate + return 'L' if gsym_prefix == '_' else '.L' + + +def detect_rodata(compiler, c_args, host_system, gsym_prefix): + default = ' .section __TEXT,__const' if host_system == 'darwin' else '.section .rodata' + c_source = '''extern const int foo[]; +const int foo[] = {1, 2, 3}; +''' + proc, s_file = compile_c_to_asm(compiler, c_args, c_source) + if proc.returncode != 0 or s_file is None: + return default + + current_section = default + label_re = re.compile(r'^\s*' + re.escape(gsym_prefix) + r'?foo(:|\b)') + for line in s_file.read_text().splitlines(): + stripped = line.strip() + if stripped.startswith(('.section', '.csect', '.data', '.rdata', '.text')): + current_section = stripped + if label_re.search(line): + return current_section + return default + + +def detect_type_size(compiler, c_args, text_dir, globl, label_suffix, host_system): + if host_system == 'darwin': + return '', '' + + type_value = '' + size_value = '' + for marker in ['@', '#', '%']: + asm = f'''{text_dir} +{globl} foo +.type foo,{marker}function +foo{label_suffix} + .byte 0 +''' + proc, _ = compile_asm(compiler, c_args, asm) + if proc.returncode == 0: + type_value = f'.type $1,{marker}$2' + break + + asm = f'''{text_dir} +{globl} foo +foo{label_suffix} + .byte 0 +.size foo,.-foo +''' + proc, _ = compile_asm(compiler, c_args, asm) + if proc.returncode == 0: + size_value = '.size $1,$2' + + return type_value, size_value + + +def detect_align_logarithmic(compiler, c_args, data_dir, globl, label_suffix, gsym_prefix): + asm = f'''{data_dir} + .byte 1 + .align 4 +{globl} foo +foo{label_suffix} + .byte 2 +''' + proc, obj_file = compile_asm(compiler, c_args, asm) + if proc.returncode != 0 or obj_file is None: + return 'yes' + + out = nm_output(obj_file) + if out is None: + return 'yes' + + for line in out.splitlines(): + fields = line.split() + if len(fields) >= 3 and fields[-1] == f'{gsym_prefix}foo': + try: + addr = int(fields[0], 16) + except ValueError: + continue + return 'yes' if addr in (16, 0x10) else 'no' + return 'yes' + + +def detect_align_fill_0x90(compiler, c_args, text_dir): + asm = f'''{text_dir} + .align 4, 0x90 + .byte 0 + .align 4, 0x90 +''' + proc, _ = compile_asm(compiler, c_args, asm) + return 'yes' if proc.returncode == 0 else 'no' + + +def detect_coff_type(compiler, c_args, text_dir, globl, label_suffix, gsym_prefix): + symbol = f'{gsym_prefix}foo' + asm = f'''{text_dir} +{globl} {symbol} +.def {symbol} +.scl 2 +.type 32 +.endef +{symbol}{label_suffix} + .byte 0 +''' + proc, _ = compile_asm(compiler, c_args, asm) + return 'yes' if proc.returncode == 0 else 'no' + + +def main(): + parser = argparse.ArgumentParser(description='Detect assembler syntax support') + parser.add_argument('--host-cpu', required=True) + parser.add_argument('--host-system', required=True) + parser.add_argument('compiler', nargs=argparse.REMAINDER) + args = parser.parse_args() + + compiler = args.compiler + if compiler and compiler[0] == '--': + compiler = compiler[1:] + if not compiler: + print('no compiler command provided', file=sys.stderr) + return 1 + + c_args = [] + text_dir = detect_text(compiler, c_args) + data_dir = detect_data(compiler, c_args) + label_suffix = detect_label_suffix(compiler, c_args, text_dir) + globl = '.globl' + globl_attr = '' + gsym_prefix = detect_gsym_prefix(compiler, c_args, args.host_system) + rodata = detect_rodata(compiler, c_args, args.host_system, gsym_prefix) + type_value, size_value = detect_type_size( + compiler, c_args, text_dir, globl, label_suffix, args.host_system) + lsym_prefix = detect_lsym_prefix(compiler, c_args, text_dir, label_suffix, gsym_prefix) + align_logarithmic = detect_align_logarithmic(compiler, c_args, data_dir, globl, label_suffix, gsym_prefix) + align_fill_0x90 = 'no' + have_coff_type = 'no' + if args.host_cpu == 'x86_64': + align_fill_0x90 = detect_align_fill_0x90(compiler, c_args, text_dir) + have_coff_type = detect_coff_type(compiler, c_args, text_dir, globl, label_suffix, gsym_prefix) + + values = { + 'TEXT': text_dir, + 'DATA': data_dir, + 'LABEL_SUFFIX': label_suffix, + 'GLOBL': globl, + 'GLOBL_ATTR': globl_attr, + 'GSYM_PREFIX': gsym_prefix, + 'RODATA': rodata, + 'TYPE': type_value, + 'SIZE': size_value, + 'LSYM_PREFIX': lsym_prefix, + 'ALIGN_LOGARITHMIC': align_logarithmic, + 'ALIGN_FILL_0x90': align_fill_0x90, + 'HAVE_COFF_TYPE': have_coff_type, + } + + for key, value in values.items(): + print(f'{key}={value}') + return 0 + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/_meson_build/config.m4.in b/_meson_build/config.m4.in index 2a36c4c373..1c12351c30 100644 --- a/_meson_build/config.m4.in +++ b/_meson_build/config.m4.in @@ -1,21 +1,23 @@ dnl config.m4. Generated automatically by configure. changequote(<,>) ifdef(<__CONFIG_M4_INCLUDED__>,,< -define(, <.text>) -define(, <.data>) -define(, <:>) -define(, <.globl>) -define(, <>) -define(, <_>) -define(, < .section __TEXT,__const>) -define(, <>) -define(, <>) -define(, @LSYM_PREFIX@) -define(,) +define(, <@TEXT@>) +define(, <@DATA@>) +define(, <@LABEL_SUFFIX@>) +define(, <@GLOBL@>) +define(, <@GLOBL_ATTR@>) +define(, <@GSYM_PREFIX@>) +define(, <@RODATA@>) +define(, <@TYPE@>) +define(, <@SIZE@>) +define(, <@LSYM_PREFIX@>) +define(,<@ALIGN_LOGARITHMIC@>) +define(,<@ALIGN_FILL_0x90@>) +define(,<@HAVE_COFF_TYPE@>) >) changequote(`,') ifdef(`__CONFIG_M4_INCLUDED__',,` -include(`../src/mpn_extras/asm-defs.m4') -include(`../src/mpn_extras/arm64/darwin.m4') +include(@SOURCE_DIR@/src/mpn_extras/asm-defs.m4) +@ASM_M4_INCLUDES@ ') define(`__CONFIG_M4_INCLUDED__') diff --git a/_meson_build/generate_meson_build.py b/_meson_build/generate_meson_build.py index 13f3c30978..7df7880442 100644 --- a/_meson_build/generate_meson_build.py +++ b/_meson_build/generate_meson_build.py @@ -246,7 +246,7 @@ s_file = custom_target(s_filename, input: [asm_file, config_m4] + asm_deps, output: s_filename, - command: [m4_prog, '@INPUT0@'], + command: [m4_prog, '-I', meson.project_build_root(), '@INPUT0@'], capture: true, ) s_files += [s_file] diff --git a/_meson_build/meson.build b/_meson_build/meson.build index 39c68c6da9..8343e931d5 100644 --- a/_meson_build/meson.build +++ b/_meson_build/meson.build @@ -57,7 +57,7 @@ if have_assembly config_m4 = configure_file( input: 'config.m4.in', output: 'config.m4', - configuration: {'LSYM_PREFIX': LSYM_PREFIX}, + configuration: asm_cfg, ) s_files = [] diff --git a/config/meson.build b/config/meson.build index eccf4e6d5c..82b7e1de95 100644 --- a/config/meson.build +++ b/config/meson.build @@ -27,6 +27,7 @@ gc_opt = get_option('gc') ntl_opt = get_option('ntl') coverage_opt = get_option('b_coverage') cpp = meson.get_compiler('cpp') +python = import('python').find_installation() # ----------------------------------------------------------------------------- # libm @@ -853,6 +854,20 @@ message('FFT_SMALL: ', have_fft_small ? 'enabled' : 'disabled') # Assembly # ----------------------------------------------------------------------------- +asm_text = '.text' +asm_data = '.data' +asm_label_suffix = ':' +asm_globl = '.globl' +asm_globl_attr = '' +asm_gsym_prefix = '' +asm_rodata = '.section .rodata' +asm_type = '' +asm_size = '' +asm_lsym_prefix = 'L' +asm_align_logarithmic = 'yes' +asm_align_fill_0x90 = 'no' +asm_have_coff_type = 'no' + if asm_path != '' and flint_bits == 64 assembly_cpu_supported = true assembly_dir = 'mpn_extras/' + asm_path @@ -874,14 +889,107 @@ assembly_opt = assembly_opt.require(host_machine.system() != 'windows', assembly_opt = assembly_opt.require(assembly_cpu_supported, error_message: 'No assembly support for host CPU') +if host_machine.cpu_family() == 'aarch64' or host_machine.cpu_family() == 'x86_64' + asm_detect = run_command( + python, + files('../_meson_build/check_assembly.py'), + [ + '--host-cpu', host_machine.cpu_family(), + '--host-system', host_machine.system(), + '--', + ] + cc.cmd_array() + flint_abi_c_args + flint_cpu_c_args, + check: true, + ) + + asm_detect_lines = asm_detect.stdout().strip().split('\n') + foreach line : asm_detect_lines + if line.contains('=') + asm_pair = line.split('=') + asm_key = asm_pair[0] + asm_value = '' + if asm_pair.length() > 1 + asm_value = asm_pair[1] + endif + if asm_key == 'TEXT' + asm_text = asm_value + elif asm_key == 'DATA' + asm_data = asm_value + elif asm_key == 'LABEL_SUFFIX' + asm_label_suffix = asm_value + elif asm_key == 'GLOBL' + asm_globl = asm_value + elif asm_key == 'GLOBL_ATTR' + asm_globl_attr = asm_value + elif asm_key == 'GSYM_PREFIX' + asm_gsym_prefix = asm_value + elif asm_key == 'RODATA' + asm_rodata = asm_value + elif asm_key == 'TYPE' + asm_type = asm_value + elif asm_key == 'SIZE' + asm_size = asm_value + elif asm_key == 'LSYM_PREFIX' + asm_lsym_prefix = asm_value + elif asm_key == 'ALIGN_LOGARITHMIC' + asm_align_logarithmic = asm_value + elif asm_key == 'ALIGN_FILL_0x90' + asm_align_fill_0x90 = asm_value + elif asm_key == 'HAVE_COFF_TYPE' + asm_have_coff_type = asm_value + endif + endif + endforeach +endif + +asm_m4_includes = '' +if host_machine.cpu_family() == 'aarch64' + if host_machine.system() == 'darwin' + asm_m4_includes = 'include(' + meson.project_source_root() + '/src/mpn_extras/arm64/darwin.m4)\n' + else + asm_m4_includes = 'include(' + meson.project_source_root() + '/src/mpn_extras/arm64/arm64-defs.m4)\n' + endif +elif host_machine.cpu_family() == 'x86_64' + asm_m4_includes = 'include(' + meson.project_source_root() + '/src/mpn_extras/x86_64/x86_64-defs.m4)\n' + if host_machine.system() == 'darwin' + asm_m4_includes += 'include(' + meson.project_source_root() + '/src/mpn_extras/x86_64/darwin.m4)\n' + endif +endif + +asm_cfg = configuration_data() +asm_cfg.set('SOURCE_DIR', meson.project_source_root()) +asm_cfg.set('TEXT', asm_text) +asm_cfg.set('DATA', asm_data) +asm_cfg.set('LABEL_SUFFIX', asm_label_suffix) +asm_cfg.set('GLOBL', asm_globl) +asm_cfg.set('GLOBL_ATTR', asm_globl_attr) +asm_cfg.set('GSYM_PREFIX', asm_gsym_prefix) +asm_cfg.set('RODATA', asm_rodata) +asm_cfg.set('TYPE', asm_type) +asm_cfg.set('SIZE', asm_size) +asm_cfg.set('LSYM_PREFIX', asm_lsym_prefix) +asm_cfg.set('ALIGN_LOGARITHMIC', asm_align_logarithmic) +asm_cfg.set('ALIGN_FILL_0x90', asm_align_fill_0x90) +asm_cfg.set('HAVE_COFF_TYPE', asm_have_coff_type) +asm_cfg.set('ASM_M4_INCLUDES', asm_m4_includes) + assembly_opt = assembly_opt.enable_auto_if(true) have_assembly = assembly_opt.enabled() message('ASSEMBLY: ', have_assembly ? 'enabled' : 'disabled') - -# XXX: Need better detection of ASM language support if have_assembly - LSYM_PREFIX = 'L' + message('ASM TEXT: "@0@"'.format(asm_text)) + message('ASM DATA: "@0@"'.format(asm_data)) + message('ASM LABEL_SUFFIX: "@0@"'.format(asm_label_suffix)) + message('ASM GLOBL: "@0@"'.format(asm_globl)) + message('ASM GLOBL_ATTR: "@0@"'.format(asm_globl_attr)) + message('ASM GSYM_PREFIX: "@0@"'.format(asm_gsym_prefix)) + message('ASM RODATA: "@0@"'.format(asm_rodata)) + message('ASM TYPE: "@0@"'.format(asm_type)) + message('ASM SIZE: "@0@"'.format(asm_size)) + message('ASM LSYM_PREFIX: "@0@"'.format(asm_lsym_prefix)) + message('ASM ALIGN_LOGARITHMIC: "@0@"'.format(asm_align_logarithmic)) + message('ASM ALIGN_FILL_0x90: "@0@"'.format(asm_align_fill_0x90)) + message('ASM HAVE_COFF_TYPE: "@0@"'.format(asm_have_coff_type)) endif # ----------------------------------------------------------------------------- @@ -1155,7 +1263,7 @@ foreach h : ac_headers_check endforeach # XXX: Need better checking for LSYM_PREFIX and related assembly options -cfg_data_internal.set_quoted('LSYM_PREFIX', 'L', +cfg_data_internal.set_quoted('LSYM_PREFIX', asm_lsym_prefix, description: 'Assembler local label prefix') cfg_data_internal.set_quoted('LT_OBJDIR', '.libs/', From 7edec77687f6d6c2e0986448c2f1259c24626ae4 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 15:15:53 +0200 Subject: [PATCH 059/104] Move non-generated meson files to root directory --- .gitignore | 7 +- _meson_build/Makefile | 31 --- _meson_build/configure | 217 ------------------ _meson_build/config.m4.in => config.m4.in | 0 {_meson_build => config}/check_assembly.py | 0 config/meson.build | 2 +- .../include => include}/flint/meson.build | 0 {_meson_build/include => include}/meson.build | 0 _meson_build/meson.build => meson.build | 0 _meson_build/meson.options => meson.options | 0 meson_bootstrap.py | 10 - ...generate_meson_build.py => update_meson.py | 28 +-- 12 files changed, 19 insertions(+), 276 deletions(-) delete mode 100644 _meson_build/Makefile delete mode 100755 _meson_build/configure rename _meson_build/config.m4.in => config.m4.in (100%) rename {_meson_build => config}/check_assembly.py (100%) rename {_meson_build/include => include}/flint/meson.build (100%) rename {_meson_build/include => include}/meson.build (100%) rename _meson_build/meson.build => meson.build (100%) rename _meson_build/meson.options => meson.options (100%) delete mode 100755 meson_bootstrap.py rename _meson_build/generate_meson_build.py => update_meson.py (93%) mode change 100644 => 100755 diff --git a/.gitignore b/.gitignore index ce3183f3d2..56dde4c75d 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ config/* !config/config.sub !config/configfsf.guess !config/configfsf.sub +!config/check_assembly.py +!config/meson.build config.log confdefs.h conftest.* @@ -63,10 +65,7 @@ libtool flint.pc autom4te.cache/ config.m4 -config.m4.in src/flint-mparam.h .gdb_history vgcore.* -meson -meson.build -meson.options +src/**/meson.build diff --git a/_meson_build/Makefile b/_meson_build/Makefile deleted file mode 100644 index 88907fd785..0000000000 --- a/_meson_build/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -BUILDDIR = build.meson - -all: setup - meson compile -C $(BUILDDIR) - -setup: $(BUILDDIR)/.build-dir-created - -$(BUILDDIR)/.build-dir-created: - meson setup $(BUILDDIR) - touch $(BUILDDIR)/.build-dir-created - -clean: - rm -rf $(BUILDDIR) - -install: setup - meson install -C $(BUILDDIR) - -uninstall: - cd $(BUILDDIR) && ninja uninstall - -test: setup - meson configure $(BUILDDIR) -Dtests=enabled - meson test -C $(BUILDDIR) --timeout-multiplier 10 - -coverage: setup - # Coverage tool e.g. gcovr needs to be installed *before* meson configure: - # pip install gcovr - meson configure $(BUILDDIR) -Dtests=enabled -Db_coverage=true - meson test -C $(BUILDDIR) --timeout-multiplier 10 - cd $(BUILDDIR) && ninja coverage-html - # open $(BUILDDIR)/meson-logs/coveragereport/index.html diff --git a/_meson_build/configure b/_meson_build/configure deleted file mode 100755 index 2985c95bf3..0000000000 --- a/_meson_build/configure +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/env python - -from os.path import join, abspath, dirname -import sys -import shutil -from subprocess import check_call -from argparse import ArgumentParser - - -def enable_disable_to_do(args, feature): - """Translate --enable-foo=no etc to foo=True/False/None""" - enable = getattr(args, 'enable_' + feature) - disable = getattr(args, 'disable_' + feature) - if enable is not None and disable is not None: - msg = 'Cannot use --enable-{} and --disable-{} together' - raise ValueError(msg.format(feature, feature)) - if enable is not None: - return enable == 'yes' - if disable is not None: - return disable == 'no' - return None - - -def run_command(cmd): - print('-' * 80) - print('$', ' '.join(cmd)) - print('-' * 80) - check_call(cmd) - - -def enabled_disabled(value): - if value is True: - return 'enabled' - elif value is False: - return 'disabled' - else: - raise ValueError('Invalid value: ' + value) - - -def true_false(value): - if value is True: - return 'true' - elif value is False: - return 'false' - else: - raise ValueError('Invalid value: ' + str(value)) - - -def add_feature_option(parser, feature): - parser.add_argument('--enable-' + feature, help='Enable ' + feature, - choices=['yes', 'no', 'auto'], nargs='?', const='yes', action='store') - parser.add_argument('--disable-' + feature, help='Disable ' + feature, - choices=['yes', 'no', 'auto'], nargs='?', const='yes', action='store') - - -def add_with_option(parser, libname, default): - parser.add_argument('--with-' + libname, help=f'Link to {libname}', - default=default, const=True, nargs='?') - - -parser = ArgumentParser(description='Configure FLINT for building with meson') - -parser.add_argument('--build-dir', default='build.meson', help='Build directory') - -parser.add_argument('--prefix', default=None, help='Installation prefix') -parser.add_argument('--bindir', default=None, help='Binary directory') -parser.add_argument('--libdir', default=None, help='Library directory') -parser.add_argument('--includedir', default=None, help='Include directory') - -parser.add_argument('--build', default=None, help='Not supported...') -parser.add_argument('--host', default=None, help='Not supported...') - -add_feature_option(parser, 'shared') -add_feature_option(parser, 'static') - -add_feature_option(parser, 'libtool-lock') -add_feature_option(parser, 'pthread') -add_feature_option(parser, 'reentrant') -add_feature_option(parser, 'thread-safe') -add_feature_option(parser, 'assert') -add_feature_option(parser, 'coverage') -add_feature_option(parser, 'debug') -add_feature_option(parser, 'dependency-tracking') -add_feature_option(parser, 'pretty-tests') - -add_feature_option(parser, 'gmp-internals') -add_feature_option(parser, 'assembly') -add_feature_option(parser, 'avx2') -add_feature_option(parser, 'avx512') - -add_with_option(parser, 'gmp', default=True) -add_with_option(parser, 'mpfr', default=True) -add_with_option(parser, 'ntl', default=False) - -parser.add_argument('--with-blas', default=None, help='Not supported...') -parser.add_argument('--with-gc', default=None, help='Not supported...') - - -def get_meson_command_from_configure_args(args): - """ - Translate e.g. - ./configure --prefix=/opt/foo --enable-assembly=no - to - meson setup build --prefix=/opt/foo -Dassembly=disabled - Raise ValueError if modifying an option is not supported. - """ - args = parser.parse_args(args) - - setup_args = [] - - if args.bindir is not None: - setup_args.append('--bindir=' + args.bindir) - if args.libdir is not None: - setup_args.append('--libdir=' + args.libdir) - else: - setup_args.append('--libdir=lib') - if args.includedir is not None: - setup_args.append('--includedir=' + args.includedir) - if args.prefix is not None: - setup_args.append('--prefix=' + args.prefix) - - do_shared = enable_disable_to_do(args, 'shared') - do_static = enable_disable_to_do(args, 'static') - - do_libtool_lock = enable_disable_to_do(args, 'libtool_lock') - do_pthread = enable_disable_to_do(args, 'pthread') - do_reentrant = enable_disable_to_do(args, 'reentrant') - do_thread_safe = enable_disable_to_do(args, 'thread_safe') - do_assert = enable_disable_to_do(args, 'assert') - do_coverage = enable_disable_to_do(args, 'coverage') - do_debug = enable_disable_to_do(args, 'debug') - do_dependency_tracking = enable_disable_to_do(args, 'dependency_tracking') - do_pretty_tests = enable_disable_to_do(args, 'pretty_tests') - - do_gmp_internals = enable_disable_to_do(args, 'gmp_internals') - do_assembly = enable_disable_to_do(args, 'assembly') - do_avx2 = enable_disable_to_do(args, 'avx2') - do_avx512 = enable_disable_to_do(args, 'avx512') - - if do_shared is None: - do_shared = True - if do_static is None: - do_static = False - - if do_shared and not do_static: - pass - elif not do_shared and do_static: - setup_args.append('--default-library=static') - elif do_shared and do_static: - setup_args.append('--default-library=both') - else: - raise ValueError('Cannot disable both shared and static libraries') - - if do_debug is True: - setup_args.append('--buildtype=debugoptimized') - - if do_libtool_lock is not None: - setup_args.append('-Dlibtool_lock=' + 'disabled') - if do_pthread is not None: - setup_args.append('-Dpthread=' + enabled_disabled(do_pthread)) - if do_reentrant is not None: - setup_args.append('-Dreentrant=' + enabled_disabled(do_reentrant)) - if do_thread_safe is not None: - setup_args.append('-Dthread_safe=' + enabled_disabled(do_thread_safe)) - if do_assert is not None: - setup_args.append('-Dassert=' + enabled_disabled(do_assert)) - if do_coverage is not None: - setup_args.append('-Db_coverage=' + true_false(do_coverage)) - if do_dependency_tracking is not None: - pass # Meson always does dependency tracking with Ninja - if do_pretty_tests is not None: - setup_args.append('-Dpretty_tests=' + enabled_disabled(do_pretty_tests)) - - if do_gmp_internals is not None: - setup_args.append('-Dgmp_internals=' + enabled_disabled(do_gmp_internals)) - - if do_assembly is not None: - setup_args.append('-Dassembly=' + enabled_disabled(do_assembly)) - - if do_avx2 is False or do_avx512 is False: - setup_args.append('-Dfft_small=' + 'disabled') - elif do_avx2 is True or do_avx512 is True: - setup_args.append('-Dfft_small=' + 'enabled') - - for lib in ['gmp', 'mpfr', 'gc', 'ntl', 'blas']: - val = getattr(args, 'with_' + lib) - if isinstance(val, str): - setup_args.append('--pkg-config-path=' + join(val, 'lib', 'pkgconfig')) - - if args.with_ntl: - setup_args.append('-Dntl=enabled') - - if args.with_blas is not None: - raise ValueError('--with-blas is not supported') - if args.with_gc is not None: - raise ValueError('--with-gc is not supported') - - cmd = ['meson', 'setup', args.build_dir] + setup_args - return cmd, args - - -def main(*args): - cmd, args = get_meson_command_from_configure_args(args) - # The default behaviour of ./configure is to basically wipe out the build. - # Everything is then rebuilt from scratch. We will do the same here to - # match the semantics of configure which does not preserve any settings - # from one run of configure to the next. When using meson directly, it is - # better not to do this because the files might not need to be rebuilt. - shutil.rmtree(args.build_dir, ignore_errors=True) - run_command(cmd) - # The Makefile uses this to check if project is configured - with open(join(args.build_dir, '.build-dir-created'), 'w') as f: - pass - - -if __name__ == '__main__': - sys.exit(main(*sys.argv[1:])) diff --git a/_meson_build/config.m4.in b/config.m4.in similarity index 100% rename from _meson_build/config.m4.in rename to config.m4.in diff --git a/_meson_build/check_assembly.py b/config/check_assembly.py similarity index 100% rename from _meson_build/check_assembly.py rename to config/check_assembly.py diff --git a/config/meson.build b/config/meson.build index 82b7e1de95..9bf94eaad3 100644 --- a/config/meson.build +++ b/config/meson.build @@ -892,7 +892,7 @@ assembly_opt = assembly_opt.require(assembly_cpu_supported, if host_machine.cpu_family() == 'aarch64' or host_machine.cpu_family() == 'x86_64' asm_detect = run_command( python, - files('../_meson_build/check_assembly.py'), + files('check_assembly.py'), [ '--host-cpu', host_machine.cpu_family(), '--host-system', host_machine.system(), diff --git a/_meson_build/include/flint/meson.build b/include/flint/meson.build similarity index 100% rename from _meson_build/include/flint/meson.build rename to include/flint/meson.build diff --git a/_meson_build/include/meson.build b/include/meson.build similarity index 100% rename from _meson_build/include/meson.build rename to include/meson.build diff --git a/_meson_build/meson.build b/meson.build similarity index 100% rename from _meson_build/meson.build rename to meson.build diff --git a/_meson_build/meson.options b/meson.options similarity index 100% rename from _meson_build/meson.options rename to meson.options diff --git a/meson_bootstrap.py b/meson_bootstrap.py deleted file mode 100755 index e610fdc18a..0000000000 --- a/meson_bootstrap.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python - -from os.path import join, dirname, abspath -from sys import executable as python, argv -from subprocess import check_call - -this_dir = dirname(abspath(__file__)) -meson_build_dir = join(this_dir, '_meson_build') -generate_script = join(meson_build_dir, 'generate_meson_build.py') -check_call([python, generate_script, this_dir] + argv[1:]) diff --git a/_meson_build/generate_meson_build.py b/update_meson.py old mode 100644 new mode 100755 similarity index 93% rename from _meson_build/generate_meson_build.py rename to update_meson.py index 7df7880442..8189145e70 --- a/_meson_build/generate_meson_build.py +++ b/update_meson.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import sys from os import listdir, makedirs from os.path import join, dirname, abspath, isdir @@ -7,8 +9,6 @@ this_dir = dirname(abspath(__file__)) files_to_copy = [ - 'configure', - 'Makefile', 'meson.build', 'meson.options', 'include/meson.build', @@ -100,7 +100,7 @@ # This file is generated automatically. # # To regenerate it, run: -# python _meson_build/generate_meson_build.py +# python update_meson.py # modules = [ @@ -159,7 +159,7 @@ # This file is generated automatically. # # To regenerate it, run: -# python _meson_build/generate_meson_build.py +# python update_meson.py # c_files_all += files( @@ -171,7 +171,7 @@ # This file is generated automatically. # # To regenerate it, run: -# python _meson_build/generate_meson_build.py +# python update_meson.py # test_exe = executable('main', @@ -189,7 +189,7 @@ # This file is generated automatically. # # To regenerate it, run: -# python _meson_build/generate_meson_build.py +# python update_meson.py # test_exe = executable('main', @@ -295,20 +295,20 @@ def get_flint_modules(flint_root): help='Do not print anything') parser.add_argument('-v', '--verbose', action='store_true', help='Show all steps') -parser.add_argument('output_dir', default='.', help='Output directory') def main(args): args = parser.parse_args(args) + output_dir = this_dir for fname in files_to_copy: src_path = join(this_dir, fname) - dst_path = join(args.output_dir, fname) + dst_path = join(output_dir, fname) if not args.quiet: print('Copying %s to %s' % (src_path, dst_path)) copy_file(src_path, dst_path) - modules = get_flint_modules(args.output_dir) + modules = get_flint_modules(output_dir) # We will generate the meson.build file for conditional modules but the # main meson.build file will decide whether to include them or not. @@ -321,7 +321,7 @@ def main(args): format_lines(mod_no_tests), format_lines(head_no_dir), ) - dst_path = join(args.output_dir, 'src', 'meson.build') + dst_path = join(output_dir, 'src', 'meson.build') if not args.quiet: print('Writing %s' % dst_path) write_file(dst_path, src_meson_build_text) @@ -330,7 +330,7 @@ def main(args): print('Making meson.build files in all modules') # src/mod/meson.build for mod in modules + mod_no_header: - mod_dir = join(args.output_dir, 'src', mod) + mod_dir = join(output_dir, 'src', mod) c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] if mod == 'fmpz': c_files = [f for f in c_files if f != 'fmpz.c'] @@ -350,7 +350,7 @@ def main(args): write_file(dst_path, test_mod_meson_build_text) # Build for the NTL tests - dst_path = join(args.output_dir, 'src', 'interfaces', 'test', 'meson.build') + dst_path = join(output_dir, 'src', 'interfaces', 'test', 'meson.build') test_mod_meson_build_text = test_mod_NTL_meson_build % 'NTL-interface' if args.verbose: print('Writing %s' % dst_path) @@ -358,7 +358,7 @@ def main(args): # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: - asm_dir = join(args.output_dir, 'src', path) + asm_dir = join(output_dir, 'src', path) asm_files = [f for f in listdir(asm_dir) if f.endswith('.asm')] asm_submodule_text = asm_submodule % format_lines(asm_files) asm_submodule_text += asm_to_s_files @@ -379,6 +379,8 @@ def write_file(dst_path, text): def copy_file(src_path, dst_path): + if abspath(src_path) == abspath(dst_path): + return makedirs(dirname(dst_path), exist_ok=True) copy2(src_path, dst_path) From c4ec5b88ddf2dc8a9d67ecd362e5589738170824 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 15:52:15 +0200 Subject: [PATCH 060/104] CI: add a CI job as a basic test of the meson build --- .github/workflows/CI.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3c3f79b0d8..f09e6e260b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,12 @@ on: - 'CMakeLists.txt' - 'config/**' - 'configure.ac' + - 'include/meson.build' + - 'include/flint/meson.build' - 'Makefile.in' + - 'meson.build' + - 'meson.options' + - 'update_meson.py' push: paths: - '.github/workflows/CI.yml' @@ -22,7 +27,12 @@ on: - 'CMakeLists.txt' - 'config/**' - 'configure.ac' + - 'include/meson.build' + - 'include/flint/meson.build' - 'Makefile.in' + - 'meson.build' + - 'meson.options' + - 'update_meson.py' env: GLOBAL_MULTIPLIER: 1 @@ -34,6 +44,31 @@ concurrency: cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: + ubuntu-meson: + name: Meson, GCC (x0.5) + runs-on: ubuntu-24.04 + env: + CC: "gcc" + TESTCOEFF: "0.5" + steps: + - name: "Rescale multiplier" + run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV + - uses: actions/checkout@v5 + - name: "Setup" + run: | + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config + $CC --version + meson --version + ninja --version + - name: "Generate Meson files" + run: python3 update_meson.py + - name: "Configure" + run: meson setup build-meson -Dtests=enabled + - name: "Compile" + run: meson compile -C build-meson + - name: "Check" + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs + assert-ntl-msolve-nemo: name: NTL, msolve and Nemo.jl runs-on: ubuntu-24.04 From 5bc13eb7cad091696e2a1c34ce784211c2f3e8c4 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 16:19:45 +0200 Subject: [PATCH 061/104] build: Add CPU args for fft_small --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 8343e931d5..04829f3310 100644 --- a/meson.build +++ b/meson.build @@ -85,6 +85,7 @@ flint_test_dep = declare_dependency( link_with: libflint, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], + compile_args: flint_cpu_c_args, ) tests_opt = get_option('tests') From 9c4dc6cd27f0f420fd944afba3f545c2f38d0811 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 16:29:17 +0200 Subject: [PATCH 062/104] Increase test timeout from 30s to 120s --- update_meson.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update_meson.py b/update_meson.py index 8189145e70..15fc111a82 100755 --- a/update_meson.py +++ b/update_meson.py @@ -181,7 +181,7 @@ build_by_default: tests_opt.enabled(), ) -test('%s', test_exe) +test('%s', test_exe, timeout: 120) ''' @@ -199,7 +199,7 @@ build_by_default: tests_opt.enabled(), ) -test('%s', test_exe) +test('%s', test_exe, timeout: 120) ''' asm_submodule_arm64 = '''\ From 08c1c06a1b7de633dc924a0f9b873a978168721a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 16:50:35 +0200 Subject: [PATCH 063/104] CI: Use meson the ARM CI jobs --- .github/workflows/CI.yml | 47 +++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f09e6e260b..ec0d22880c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -176,7 +176,7 @@ jobs: run: $MAKE $MODULES ubuntu-arm: - name: ARM (x0.5) + name: Meson, ARM (x0.5) runs-on: ubuntu-24.04-arm env: CC: "gcc" @@ -187,23 +187,21 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config $CC --version - make --version - autoconf --version - libtool --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} --disable-debug - - name: "Compile library" - run: $MAKE && ldd libflint.so - - name: "Compile tests" - run: $MAKE tests + run: meson setup build-meson -Dtests=enabled + - name: "Compile" + run: meson compile -C build-meson - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs macos-m1: - name: M1 (x0.5) + name: Meson, M1 (x0.5) runs-on: macos-26 env: TESTCOEFF: "0.5" @@ -213,21 +211,20 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - brew install make autoconf libtool automake llvm + brew install gmp mpfr meson ninja pkg-config llvm + echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH=$(brew --prefix gmp)/lib/pkgconfig:$(brew --prefix mpfr)/lib/pkgconfig" >> $GITHUB_ENV $(brew --prefix llvm)/bin/clang --version - gmake --version - autoconf --version - echo "MAKE=gmake -j$(expr $(nproc) + 1) -l 10 --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=$(brew --prefix llvm)/bin/clang --with-gmp=$(brew --prefix) --with-mpfr=$(brew --prefix) --disable-debug - - name: "Compile library" - run: $MAKE - - name: "Compile tests" - run: $MAKE tests - - name: "Compile profiles" - run: $MAKE profile + run: meson setup build-meson -Dtests=enabled + - name: "Compile" + run: meson compile -C build-meson - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs ubuntu-clang: name: ASan, BLAS, examples (x1) From 4cff28c4f33a83a5793d8ecb203e4ea80da1f29d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 17:02:12 +0200 Subject: [PATCH 064/104] CI: Use meson for alpine 32 and mingw-gcc jobs --- .github/workflows/CI.yml | 63 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 33 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ec0d22880c..264e09910e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,11 +63,11 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build-meson -Dtests=enabled + run: meson setup build -Dtests=enabled - name: "Compile" - run: meson compile -C build-meson + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs assert-ntl-msolve-nemo: name: NTL, msolve and Nemo.jl @@ -194,11 +194,11 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build-meson -Dtests=enabled + run: meson setup build -Dtests=enabled - name: "Compile" - run: meson compile -C build-meson + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs macos-m1: name: Meson, M1 (x0.5) @@ -220,11 +220,11 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build-meson -Dtests=enabled + run: meson setup build -Dtests=enabled - name: "Compile" - run: meson compile -C build-meson + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build-meson --print-errorlogs + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs ubuntu-clang: name: ASan, BLAS, examples (x1) @@ -258,7 +258,7 @@ jobs: run: $MAKE checkexamples mingw64-gcc: - name: MinGW (x0.5) + name: Meson, MinGW (x0.5) runs-on: windows-latest defaults: run: @@ -273,24 +273,22 @@ jobs: with: msystem: mingw64 update: true - install: bc mingw-w64-x86_64-gcc mingw-w64-x86_64-autotools + install: bc mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp mingw-w64-x86_64-mpfr mingw-w64-x86_64-meson mingw-w64-x86_64-ninja mingw-w64-x86_64-pkgconf - name: "Rescale multiplier" run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV - name: "Setup" run: | gcc --version - make --version - autoconf --version - libtool --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + - name: "Generate Meson files" + run: python update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} --enable-fast-build --disable-debug - - name: "Compile library" - run: $MAKE - - name: "Compile tests" - run: $MAKE tests + run: meson setup build -Dtests=enabled + - name: "Compile" + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs msvc: name: MSVC (x0.5) @@ -335,7 +333,7 @@ jobs: ctest -j5 --output-on-failure alpine-32bit: - name: 32-bit, musl, assert (x2.5) + name: Meson, 32-bit, musl, assert (x2.5) runs-on: ubuntu-24.04 env: CC: "gcc" @@ -350,21 +348,20 @@ jobs: with: arch: x86 branch: edge - packages: gmp-dev mpfr-dev gcc musl-dev make autoconf automake libtool + packages: gmp-dev mpfr-dev gcc musl-dev meson ninja pkgconf python3 - name: "Rescale multiplier" run: echo "FLINT_TEST_MULTIPLIER=$(echo "${TESTCOEFF} * ${GLOBAL_MULTIPLIER}" | bc)" >> $GITHUB_ENV - name: "Setup" run: | gcc --version - make --version - autoconf --version - libtool --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + python3 --version + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} --enable-assert --disable-debug - - name: "Compile library" - run: $MAKE - - name: "Compile tests" - run: $MAKE tests + run: meson setup build -Dtests=enabled -Dassert=enabled + - name: "Compile" + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs From 2f65498256b4c2d93324d00ba7a0b3ea28ee1ff5 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 17:20:33 +0200 Subject: [PATCH 065/104] build: don't require a C++ compiler if not using NTL --- config/meson.build | 133 ++++++++++++++++++++++++--------------------- meson.build | 7 +-- 2 files changed, 74 insertions(+), 66 deletions(-) diff --git a/config/meson.build b/config/meson.build index 9bf94eaad3..0d7ed16742 100644 --- a/config/meson.build +++ b/config/meson.build @@ -26,7 +26,6 @@ blas_opt = get_option('blas') gc_opt = get_option('gc') ntl_opt = get_option('ntl') coverage_opt = get_option('b_coverage') -cpp = meson.get_compiler('cpp') python = import('python').find_installation() # ----------------------------------------------------------------------------- @@ -100,73 +99,83 @@ ntl_dep = declare_dependency() have_ntl = false if not ntl_opt.disabled() - ntl_candidates = [ - dependency('ntl', required: false, static: true), - dependency('ntl', required: false), - ] - - foreach dep : ntl_candidates - if dep.found() - dep_has_ntl_h = cpp.has_header('NTL/ZZ.h', dependencies: dep) - dep_links_ntl = dep_has_ntl_h and cpp.links( - ''' - #include - #include - - int main() { - NTL::ZZ a, b, c; - std::cin >> a; - std::cin >> b; - c = (a + 1) * (b + 1); - std::cout << c << "\\n"; - return 0; - } - ''', - dependencies: dep, - name: 'if linking with NTL works') - if dep_links_ntl - ntl_dep = dep - have_ntl = true - break + have_cpp = add_languages('cpp', native: false, required: false) + + if have_cpp + cpp = meson.get_compiler('cpp') + add_project_arguments(flint_abi_c_args, language: 'cpp') + add_project_link_arguments(flint_abi_c_args, language: 'cpp') + + ntl_candidates = [ + dependency('ntl', required: false, static: true), + dependency('ntl', required: false), + ] + + foreach dep : ntl_candidates + if dep.found() + dep_has_ntl_h = cpp.has_header('NTL/ZZ.h', dependencies: dep) + dep_links_ntl = dep_has_ntl_h and cpp.links( + ''' + #include + #include + + int main() { + NTL::ZZ a, b, c; + std::cin >> a; + std::cin >> b; + c = (a + 1) * (b + 1); + std::cout << c << "\\n"; + return 0; + } + ''', + dependencies: dep, + name: 'if linking with NTL works') + if dep_links_ntl + ntl_dep = dep + have_ntl = true + break + endif endif - endif - endforeach + endforeach - if not have_ntl - libntl_dep = cpp.find_library('ntl', required: false) - if libntl_dep.found() and cpp.has_header('NTL/ZZ.h') - libntl_full_dep = declare_dependency( - dependencies: [libntl_dep, gmp_link_dep], - ) - lib_links_ntl = cpp.links( - ''' - #include - #include - - int main() { - NTL::ZZ a, b, c; - std::cin >> a; - std::cin >> b; - c = (a + 1) * (b + 1); - std::cout << c << "\\n"; - return 0; - } - ''', - dependencies: libntl_full_dep, - name: 'if linking with NTL works') - if lib_links_ntl - ntl_dep = libntl_full_dep - have_ntl = true + if not have_ntl + libntl_dep = cpp.find_library('ntl', required: false) + if libntl_dep.found() and cpp.has_header('NTL/ZZ.h') + libntl_full_dep = declare_dependency( + dependencies: [libntl_dep, gmp_link_dep], + ) + lib_links_ntl = cpp.links( + ''' + #include + #include + + int main() { + NTL::ZZ a, b, c; + std::cin >> a; + std::cin >> b; + c = (a + 1) * (b + 1); + std::cout << c << "\\n"; + return 0; + } + ''', + dependencies: libntl_full_dep, + name: 'if linking with NTL works') + if lib_links_ntl + ntl_dep = libntl_full_dep + have_ntl = true + endif endif endif - endif - if ntl_opt.enabled() and not have_ntl - if not cpp.has_header('NTL/ZZ.h') - error('Could not find NTL/ZZ.h') - else - error('NTL library was not found.') + if ntl_opt.enabled() and not have_ntl + if not cpp.has_header('NTL/ZZ.h') + error('Could not find NTL/ZZ.h') + else + error('NTL library was not found.') + endif endif + elif ntl_opt.enabled() + error('A C++ compiler is required for NTL support.') endif endif diff --git a/meson.build b/meson.build index 04829f3310..243d5e1e39 100644 --- a/meson.build +++ b/meson.build @@ -1,11 +1,10 @@ -project('FLINT', 'c', 'cpp', +project('FLINT', 'c', version: '3.6.0-dev', license: 'LGPL3+', meson_version: '>=1.1.0', default_options: [ 'buildtype=release', 'c_std=c11', - 'cpp_std=c++11', ], ) @@ -47,8 +46,8 @@ if have_gc flint_deps += gc_dep endif -add_project_arguments(flint_abi_c_args, language: ['c', 'cpp']) -add_project_link_arguments(flint_abi_c_args, language: ['c', 'cpp']) +add_project_arguments(flint_abi_c_args, language: 'c') +add_project_link_arguments(flint_abi_c_args, language: 'c') subdir('src') From 50f465265fde37cfd1e7f5fc085dabe16780ca32 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 17:24:12 +0200 Subject: [PATCH 066/104] suppress the same warnings in the meson build --- config/meson.build | 3 ++- meson.build | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config/meson.build b/config/meson.build index 0d7ed16742..a3fdd88fdd 100644 --- a/config/meson.build +++ b/config/meson.build @@ -414,10 +414,11 @@ message('EXACT CPU:', exact_cpu) ################################################################################ gcc_cflags = '-O3 -pedantic -std=c11' -gcc_warnings = '-Werror=implicit-function-declaration -Wall -Wno-stringop-overread -Wno-stringop-overflow' +gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wno-deprecated-declarations' gcc_cflags_optlist = '' gcc_cflags_arch = '' gcc_cflags_tune = '' +flint_warning_c_args = cc.get_supported_arguments(gcc_warnings.split()) flint_cpu_c_args = [] # We only try to provide specifics for those systems that currently supports diff --git a/meson.build b/meson.build index 243d5e1e39..8c466eb7b5 100644 --- a/meson.build +++ b/meson.build @@ -31,13 +31,10 @@ gmp_link_dep = declare_dependency( link_args: ['-L' + gmp_libdir], ) -add_project_arguments( - '-Werror=implicit-function-declaration', - language: 'c', -) - subdir('config') +add_project_arguments(flint_warning_c_args, language: 'c') + flint_deps = [gmp_link_dep, mpfr_dep, m_dep] if have_blas flint_deps += blas_dep From bf24b9e70bd57fade1d476da81a6373408a76e2f Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 17:30:33 +0200 Subject: [PATCH 067/104] Add dependency on the generated headers --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 8c466eb7b5..cd4087ea69 100644 --- a/meson.build +++ b/meson.build @@ -81,6 +81,7 @@ flint_test_dep = declare_dependency( link_with: libflint, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], + sources: headers_all, compile_args: flint_cpu_c_args, ) From 9cae23fbe10f9038d9a6d62ac62e779fe5eb9e0b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 17:49:01 +0200 Subject: [PATCH 068/104] CI use meson instead of cmake for the MSVC job --- .github/workflows/CI.yml | 35 ++++++++++++++++---------------- config/meson.build | 44 ++++++++++++++++++++++++++++++++++++++++ meson.build | 10 ++++++--- 3 files changed, 69 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 264e09910e..f9cab408bc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -291,7 +291,7 @@ jobs: run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs msvc: - name: MSVC (x0.5) + name: Meson, MSVC (x0.5) runs-on: windows-latest env: TESTCOEFF: "0.5" @@ -309,28 +309,29 @@ jobs: restore-keys: | ${{ runner.os }}-vcpkg- - name: "Install vcpkg packages" - run: vcpkg install gmp mpfr pthreads --binarysource="clear;files,${{ runner.temp }}\vcpkg\archives,readwrite" + run: vcpkg install gmp mpfr pthreads pkgconf --binarysource="clear;files,${{ runner.temp }}\vcpkg\archives,readwrite" - name: "Setup MSVC" uses: ilammy/msvc-dev-cmd@v1.13.0 with: arch: x86_64 - - name: "Configure" + - name: "Setup Meson" run: | - mkdir build; cd build - cmake ` - -G "Ninja" ` - -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ` - -DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996" ` - -DBUILD_TESTING=ON ` - -DCMAKE_BUILD_TYPE=Release ` - .. - - name: "Build" - run: cd build; cmake --build . -j5 + python -m pip install meson ninja + echo "PKG_CONFIG_PATH=C:/vcpkg/installed/x64-windows/lib/pkgconfig" | Out-File -Append -FilePath $env:GITHUB_ENV + echo "C:\vcpkg\installed\x64-windows\bin" | Out-File -Append -FilePath $env:GITHUB_PATH + echo "C:\vcpkg\installed\x64-windows\tools\pkgconf" | Out-File -Append -FilePath $env:GITHUB_PATH + cl 2>&1 | Select-Object -First 3 + meson --version + ninja --version + C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe --version + - name: "Generate Meson files" + run: python update_meson.py + - name: "Configure" + run: meson setup build -Dtests=enabled + - name: "Compile" + run: meson compile -C build - name: "Check" - run: | - cd build - set "FLINT_TEST_MULTIPLIER=$env:FLINT_TEST_MULTIPLIER" - ctest -j5 --output-on-failure + run: echo "FLINT_TEST_MULTIPLIER = $env:FLINT_TEST_MULTIPLIER"; meson test -C build --print-errorlogs alpine-32bit: name: Meson, 32-bit, musl, assert (x2.5) diff --git a/config/meson.build b/config/meson.build index a3fdd88fdd..87778aa00d 100644 --- a/config/meson.build +++ b/config/meson.build @@ -36,6 +36,50 @@ if not cc.has_function('atan2', dependencies: m_dep) error('libm is required') endif +# ----------------------------------------------------------------------------- +# POSIX threads +# ----------------------------------------------------------------------------- + +pthread_dep = declare_dependency() +have_pthread = false + +if pthread_opt.enabled() + pthread_candidates = [] + + if host_machine.system() == 'windows' + pthread_candidates += [ + dependency('PThreads4W', required: false, method: 'cmake'), + dependency('pthreads4w', required: false), + ] + endif + + pthread_candidates += [ + dependency('pthread', required: false), + dependency('pthreads', required: false), + dependency('threads', required: false), + ] + + foreach dep : pthread_candidates + if dep.found() and cc.has_header('pthread.h', dependencies: dep) and cc.has_function('pthread_create', dependencies: dep) + pthread_dep = dep + have_pthread = true + break + endif + endforeach + + if not have_pthread + libpthread_dep = cc.find_library('pthread', required: false) + if libpthread_dep.found() and cc.has_header('pthread.h', dependencies: libpthread_dep) and cc.has_function('pthread_create', dependencies: libpthread_dep) + pthread_dep = libpthread_dep + have_pthread = true + endif + endif + + if not have_pthread + error('POSIX threads was not found.') + endif +endif + # ----------------------------------------------------------------------------- # BLAS # ----------------------------------------------------------------------------- diff --git a/meson.build b/meson.build index cd4087ea69..6bc23bb325 100644 --- a/meson.build +++ b/meson.build @@ -25,17 +25,21 @@ m_dep = cc.find_library('m', required: false) gmp_dep = dependency('gmp', version: '>= 6.2.1') mpfr_dep = dependency('mpfr', version: '>= 4.1.0') -gmp_libdir = gmp_dep.get_variable(pkgconfig: 'libdir') +gmp_link_args = [] +if cc.get_argument_syntax() != 'msvc' + gmp_libdir = gmp_dep.get_variable(pkgconfig: 'libdir') + gmp_link_args = ['-L' + gmp_libdir] +endif gmp_link_dep = declare_dependency( dependencies: gmp_dep, - link_args: ['-L' + gmp_libdir], + link_args: gmp_link_args, ) subdir('config') add_project_arguments(flint_warning_c_args, language: 'c') -flint_deps = [gmp_link_dep, mpfr_dep, m_dep] +flint_deps = [gmp_link_dep, mpfr_dep, m_dep, pthread_dep] if have_blas flint_deps += blas_dep endif From 0c735ead9ffc5ca33e4698ce4f2cd60584baa1c9 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 21:16:40 +0200 Subject: [PATCH 069/104] CI: use the vcpkg pkgconfig rather than the Strawberry one in CI --- .github/workflows/CI.yml | 4 +++- update_meson.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f9cab408bc..2ed78027ae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -317,7 +317,9 @@ jobs: - name: "Setup Meson" run: | python -m pip install meson ninja - echo "PKG_CONFIG_PATH=C:/vcpkg/installed/x64-windows/lib/pkgconfig" | Out-File -Append -FilePath $env:GITHUB_ENV + $pkgConfigPath = "C:/vcpkg/installed/x64-windows/lib/pkgconfig" + echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe" | Out-File -Append -FilePath $env:GITHUB_ENV + echo "PKG_CONFIG_PATH=$pkgConfigPath" | Out-File -Append -FilePath $env:GITHUB_ENV echo "C:\vcpkg\installed\x64-windows\bin" | Out-File -Append -FilePath $env:GITHUB_PATH echo "C:\vcpkg\installed\x64-windows\tools\pkgconf" | Out-File -Append -FilePath $env:GITHUB_PATH cl 2>&1 | Select-Object -First 3 diff --git a/update_meson.py b/update_meson.py index 15fc111a82..79839b59fd 100755 --- a/update_meson.py +++ b/update_meson.py @@ -181,7 +181,7 @@ build_by_default: tests_opt.enabled(), ) -test('%s', test_exe, timeout: 120) +test('%s', test_exe, timeout: 0) ''' @@ -199,7 +199,7 @@ build_by_default: tests_opt.enabled(), ) -test('%s', test_exe, timeout: 120) +test('%s', test_exe, timeout: 0) ''' asm_submodule_arm64 = '''\ From c161f72765348d77017c8c96c0298167c32c39b9 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 21:51:55 +0200 Subject: [PATCH 070/104] CI: tell meson to use CMake to find pthreads --- .github/workflows/CI.yml | 1 + config/meson.build | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ed78027ae..8888745a50 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -320,6 +320,7 @@ jobs: $pkgConfigPath = "C:/vcpkg/installed/x64-windows/lib/pkgconfig" echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe" | Out-File -Append -FilePath $env:GITHUB_ENV echo "PKG_CONFIG_PATH=$pkgConfigPath" | Out-File -Append -FilePath $env:GITHUB_ENV + echo "CMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows" | Out-File -Append -FilePath $env:GITHUB_ENV echo "C:\vcpkg\installed\x64-windows\bin" | Out-File -Append -FilePath $env:GITHUB_PATH echo "C:\vcpkg\installed\x64-windows\tools\pkgconf" | Out-File -Append -FilePath $env:GITHUB_PATH cl 2>&1 | Select-Object -First 3 diff --git a/config/meson.build b/config/meson.build index 87778aa00d..7471207812 100644 --- a/config/meson.build +++ b/config/meson.build @@ -48,6 +48,7 @@ if pthread_opt.enabled() if host_machine.system() == 'windows' pthread_candidates += [ + dependency('unofficial-pthreads', required: false, method: 'cmake', modules: ['unofficial::pthreads::pthread']), dependency('PThreads4W', required: false, method: 'cmake'), dependency('pthreads4w', required: false), ] @@ -1277,7 +1278,7 @@ foreach h : mandatory_headers endif endforeach -if pthread_opt.enabled() and not cc.has_header('pthread.h') +if pthread_opt.enabled() and not have_pthread and not cc.has_header('pthread.h') error('Could not find pthread.h') endif From 8b8c0dd70ce43cf16de281de5c14bd711e2fafaf Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 22:18:33 +0200 Subject: [PATCH 071/104] build examples with meson and use meson for ASan CI job --- .github/workflows/CI.yml | 27 +++++++++----------- .gitignore | 1 + include/flint/meson.build | 5 ++-- meson.build | 5 ++++ meson.options | 2 ++ update_meson.py | 52 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8888745a50..d2f23d326f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -238,24 +238,21 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin perl libopenblas-dev + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config perl libopenblas-dev clang --version - make --version - autoconf --version - libtool --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} --with-blas --disable-debug --enable-asan - - name: "Compile library" - run: $MAKE && ldd libflint.so - - name: "Compile tests" - run: $MAKE tests + run: meson setup build -Dtests=enabled -Dexamples=enabled -Dblas=enabled -Db_sanitize=address -Db_lundef=false + - name: "Compile" + run: meson compile -C build - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check - - name: "Compile examples" - run: $MAKE examples - - name: "Check examples" - run: $MAKE checkexamples + env: + ASAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1 + UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs mingw64-gcc: name: Meson, MinGW (x0.5) diff --git a/.gitignore b/.gitignore index 56dde4c75d..505741b46c 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ src/flint-mparam.h .gdb_history vgcore.* src/**/meson.build +examples/meson.build diff --git a/include/flint/meson.build b/include/flint/meson.build index 9848867438..c4858e8cb0 100644 --- a/include/flint/meson.build +++ b/include/flint/meson.build @@ -49,11 +49,12 @@ flint_mparam_h = fs.copyfile( # Copy all the other headers to the build directory so you can do # gcc -Ibuild-dir/include ... +public_headers = [] foreach h: headers_all - fs.copyfile(h, kwargs: header_install_kwargs) + public_headers += fs.copyfile(h, kwargs: header_install_kwargs) endforeach -headers_all += [ +headers_all = public_headers + [ flint_h, flint_config_h, config_h, diff --git a/meson.build b/meson.build index 6bc23bb325..97e52b608e 100644 --- a/meson.build +++ b/meson.build @@ -89,6 +89,11 @@ flint_test_dep = declare_dependency( compile_args: flint_cpu_c_args, ) +examples_opt = get_option('examples') +if not examples_opt.disabled() + subdir('examples') +endif + tests_opt = get_option('tests') if not tests_opt.disabled() foreach mod_test : mod_tests diff --git a/meson.options b/meson.options index 7880354975..cc684a72d6 100644 --- a/meson.options +++ b/meson.options @@ -1,5 +1,7 @@ option('tests', type : 'feature', value : 'auto', description: 'Configure tests; enabled also builds them by default') +option('examples', type : 'feature', value : 'disabled', + description: 'Configure example programs; enabled also builds and tests them by default') option('libtool_lock', type : 'feature', value : 'enabled', description: 'Use libtool lock') option('pthread', type : 'feature', value : 'enabled', diff --git a/update_meson.py b/update_meson.py index 79839b59fd..abb949d413 100755 --- a/update_meson.py +++ b/update_meson.py @@ -202,6 +202,46 @@ test('%s', test_exe, timeout: 0) ''' +examples_meson_build = '''\ +# +# This file is generated automatically. +# +# To regenerate it, run: +# python update_meson.py +# + +check_examples = find_program('../dev/check_examples.sh') + +example_exes = [] + +foreach example : [ +%s +] + example_exe = executable( + example, + example + '.c', + dependencies: [flint_test_dep], + include_directories: [headers_built_inc], + install: false, + build_by_default: examples_opt.enabled(), + ) + + example_exes += example_exe + + test( + 'example_' + example, + check_examples, + args: [example, meson.current_build_dir()], + depends: example_exe, + suite: 'examples', + timeout: 0, + workdir: meson.project_source_root(), + ) +endforeach + +alias_target('examples', example_exes) +''' + asm_submodule_arm64 = '''\ asm_deps = [ @@ -356,6 +396,18 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, test_mod_meson_build_text) + # examples/meson.build + examples_dir = join(output_dir, 'examples') + examples = [ + f[:-2] for f in listdir(examples_dir) + if f.endswith('.c') + ] + examples_meson_build_text = examples_meson_build % format_lines(examples) + dst_path = join(examples_dir, 'meson.build') + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, examples_meson_build_text) + # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: asm_dir = join(output_dir, 'src', path) From 1210252aadb383363c6e1381d1be26cb0fc787dc Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 22:24:34 +0200 Subject: [PATCH 072/104] Show vcpkg pthreads information (for debugging) --- .github/workflows/CI.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d2f23d326f..18cf5912c6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -324,6 +324,12 @@ jobs: meson --version ninja --version C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe --version + - name: "Inspect vcpkg pthreads" + run: | + Get-ChildItem C:\vcpkg\installed\x64-windows\include -Filter '*pthread*' | Select-Object FullName + Get-ChildItem C:\vcpkg\installed\x64-windows\lib -Filter '*pthread*' | Select-Object FullName + Get-ChildItem C:\vcpkg\installed\x64-windows\lib\pkgconfig -Filter '*pthread*' | Select-Object FullName + Get-ChildItem C:\vcpkg\installed\x64-windows\share -Recurse -Filter '*pthread*' | Select-Object FullName - name: "Generate Meson files" run: python update_meson.py - name: "Configure" From 11739a857cca20c3ba44da32e3a2e012b3ce716a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 23:00:44 +0200 Subject: [PATCH 073/104] CI: Use meson for ASan job --- .github/workflows/CI.yml | 24 +++++++++++++++--------- config/meson.build | 15 +++++++++------ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 18cf5912c6..92116eab7e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -79,21 +79,27 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev libntl-dev autoconf libtool-bin + sudo apt-get install -y libgmp-dev libmpfr-dev libntl-dev autoconf libtool-bin meson ninja-build pkg-config $CC --version make --version autoconf --version libtool --version + meson --version + ninja --version julia --version echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Build FLINT for msolve" run: | - ./bootstrap.sh && ./configure CC=${CC} --with-ntl --enable-assert - $MAKE && sudo make install && sudo ldconfig + meson setup build -Dtests=enabled -Dntl=enabled -Dassert=enabled + meson compile -C build + sudo meson install -C build + sudo ldconfig - name: "Test FLINT for msolve" run: | - $MAKE tests - $MAKE check + echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" + meson test -C build --print-errorlogs - name: "Test msolve" run: | git clone --depth=1 https://github.com/algebraic-solving/msolve @@ -103,14 +109,14 @@ jobs: gmp_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(gmp_artifact_dir())') mpfr_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(mpfr_artifact_dir())') echo "Path to GMP and MPFR: ${gmp_path}, ${mpfr_path}" - ./bootstrap.sh && ./configure CC=${CC} --with-gmp=$gmp_path --with-mpfr=$mpfr_path && $MAKE - mkdir lib - cp libflint.so* lib/ + PKG_CONFIG_PATH="${gmp_path}/lib/pkgconfig:${mpfr_path}/lib/pkgconfig" meson setup build-nemo --prefix="$(pwd)/nemo-flint" -Dlibdir=lib -Dtests=disabled + meson compile -C build-nemo + meson install -C build-nemo - name: "Test Nemo.jl" run: | git clone --depth 1 https://github.com/Nemocas/Nemo.jl.git mkdir -p ~/.julia/artifacts - echo -e "[e134572f-a0d5-539d-bddf-3cad8db41a82]\nFLINT = \"$(pwd)\"" > ~/.julia/artifacts/Overrides.toml + echo -e "[e134572f-a0d5-539d-bddf-3cad8db41a82]\nFLINT = \"$(pwd)/nemo-flint\"" > ~/.julia/artifacts/Overrides.toml julia -e "import Pkg; Pkg.develop(path=\"./Nemo.jl\"); Pkg.test(\"Nemo\")" ubuntu-codecov: diff --git a/config/meson.build b/config/meson.build index 7471207812..f855b96485 100644 --- a/config/meson.build +++ b/config/meson.build @@ -28,6 +28,15 @@ ntl_opt = get_option('ntl') coverage_opt = get_option('b_coverage') python = import('python').find_installation() +flint_abi_c_args = [] +if abi_opt != 'auto' + abi_flag = '-m' + abi_opt + if not cc.has_argument(abi_flag) + error(meson.get_compiler('c').get_id() + ' does not support ' + abi_flag) + endif + flint_abi_c_args += abi_flag +endif + # ----------------------------------------------------------------------------- # libm # ----------------------------------------------------------------------------- @@ -307,13 +316,7 @@ if gmp_long_long_limb description: 'Define to use long long limbs') endif -flint_abi_c_args = [] if abi_opt != 'auto' - abi_flag = '-m' + abi_opt - if not cc.has_argument(abi_flag) - error(meson.get_compiler('c').get_id() + ' does not support ' + abi_flag) - endif - flint_abi_c_args += abi_flag flint_bits = abi_opt == '64' ? 64 : 32 else gmp_64_bit_limb = cc.compiles(''' From 1a7ff492da9250efa16b45e254b558c75a440358 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 23:02:07 +0200 Subject: [PATCH 074/104] Try more approaches for vcpkg pthreads... --- config/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index f855b96485..971e423b13 100644 --- a/config/meson.build +++ b/config/meson.build @@ -58,7 +58,9 @@ if pthread_opt.enabled() if host_machine.system() == 'windows' pthread_candidates += [ dependency('unofficial-pthreads', required: false, method: 'cmake', modules: ['unofficial::pthreads::pthread']), - dependency('PThreads4W', required: false, method: 'cmake'), + dependency('PThreads4W', required: false, method: 'cmake', modules: ['PThreads4W::PThreads4W']), + dependency('PThreads4W', required: false, method: 'cmake', modules: ['PThreads4W::pthread']), + dependency('PThreads4W', required: false, method: 'cmake', modules: ['PThreads4W::pthreadVC3']), dependency('pthreads4w', required: false), ] endif From 6375c95efa8e250fb9f1d57211812a6740284e0a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Wed, 17 Jun 2026 23:30:03 +0200 Subject: [PATCH 075/104] More attempts at pthreads for MSVC --- .github/workflows/CI.yml | 2 ++ config/meson.build | 13 ++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 92116eab7e..ba6d7b9691 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -324,6 +324,8 @@ jobs: echo "PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe" | Out-File -Append -FilePath $env:GITHUB_ENV echo "PKG_CONFIG_PATH=$pkgConfigPath" | Out-File -Append -FilePath $env:GITHUB_ENV echo "CMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows" | Out-File -Append -FilePath $env:GITHUB_ENV + echo "INCLUDE=C:\vcpkg\installed\x64-windows\include;$env:INCLUDE" | Out-File -Append -FilePath $env:GITHUB_ENV + echo "LIB=C:\vcpkg\installed\x64-windows\lib;$env:LIB" | Out-File -Append -FilePath $env:GITHUB_ENV echo "C:\vcpkg\installed\x64-windows\bin" | Out-File -Append -FilePath $env:GITHUB_PATH echo "C:\vcpkg\installed\x64-windows\tools\pkgconf" | Out-File -Append -FilePath $env:GITHUB_PATH cl 2>&1 | Select-Object -First 3 diff --git a/config/meson.build b/config/meson.build index 971e423b13..22c541c2e7 100644 --- a/config/meson.build +++ b/config/meson.build @@ -80,11 +80,14 @@ if pthread_opt.enabled() endforeach if not have_pthread - libpthread_dep = cc.find_library('pthread', required: false) - if libpthread_dep.found() and cc.has_header('pthread.h', dependencies: libpthread_dep) and cc.has_function('pthread_create', dependencies: libpthread_dep) - pthread_dep = libpthread_dep - have_pthread = true - endif + foreach libname : ['pthread', 'pthreadVC3', 'pthreadVCE3', 'pthreadVSE3'] + libpthread_dep = cc.find_library(libname, required: false) + if libpthread_dep.found() and cc.has_header('pthread.h', dependencies: libpthread_dep) and cc.has_function('pthread_create', dependencies: libpthread_dep) + pthread_dep = libpthread_dep + have_pthread = true + break + endif + endforeach endif if not have_pthread From 837100deedfa9ff594b10e9a41b410c517b54802 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 00:00:36 +0200 Subject: [PATCH 076/104] build: add /experimental:c11atomics for MSVC --- config/meson.build | 4 ++++ meson.build | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 22c541c2e7..86a0722c15 100644 --- a/config/meson.build +++ b/config/meson.build @@ -472,6 +472,10 @@ gcc_cflags_optlist = '' gcc_cflags_arch = '' gcc_cflags_tune = '' flint_warning_c_args = cc.get_supported_arguments(gcc_warnings.split()) +flint_msvc_c_args = [] +if pthread_opt.enabled() and cc.get_argument_syntax() == 'msvc' + flint_msvc_c_args += cc.get_supported_arguments('/experimental:c11atomics') +endif flint_cpu_c_args = [] # We only try to provide specifics for those systems that currently supports diff --git a/meson.build b/meson.build index 97e52b608e..b9d20eab21 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,7 @@ gmp_link_dep = declare_dependency( subdir('config') -add_project_arguments(flint_warning_c_args, language: 'c') +add_project_arguments(flint_warning_c_args + flint_msvc_c_args, language: 'c') flint_deps = [gmp_link_dep, mpfr_dep, m_dep, pthread_dep] if have_blas From 117b7821c9c92e09b14ba127adf11fdf1397dcb7 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 09:19:05 +0200 Subject: [PATCH 077/104] meson: export symbols for MSVC shared builds --- .gitignore | 1 + config/generate_msvc_def.py | 102 ++++++++++++++++++++++++++++++++++++ config/meson.build | 5 ++ meson.build | 55 ++++++++++++++----- src/flint.h.in | 12 ++++- 5 files changed, 162 insertions(+), 13 deletions(-) create mode 100644 config/generate_msvc_def.py diff --git a/.gitignore b/.gitignore index 505741b46c..428c8b0530 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ config/* !config/configfsf.guess !config/configfsf.sub !config/check_assembly.py +!config/generate_msvc_def.py !config/meson.build config.log confdefs.h diff --git a/config/generate_msvc_def.py b/config/generate_msvc_def.py new file mode 100644 index 0000000000..a04f94940b --- /dev/null +++ b/config/generate_msvc_def.py @@ -0,0 +1,102 @@ +#!/usr/bin/env python3 +import argparse +import re +from pathlib import Path + + +C_SOURCE_RE = re.compile(r"['\"]([^'\"]+\.c)['\"]") +COMMENT_RE = re.compile(r"/\*.*?\*/|//[^\n]*", re.S) +SIGNATURE_RE = re.compile(r"([A-Za-z_]\w*)\s*\([^;{}]*\)\s*$", re.S) +SKIP_SYMBOLS = { + "TEMPLATE", + "_TEMPLATE", + "TEMPLATE3", + "TEMPLATE4", + "main", +} + + +def meson_c_sources(source_root, with_fft_small, fmpz_source): + src_root = source_root / "src" + sources = {src_root / "fmpz" / "link" / fmpz_source} + + for meson_build in src_root.glob("*/meson.build"): + mod = meson_build.parent.name + if mod == "fft_small" and not with_fft_small: + continue + + text = meson_build.read_text(encoding="utf-8") + for match in C_SOURCE_RE.finditer(text): + source = meson_build.parent / match.group(1) + if "test" in source.parts or "profile" in source.parts: + continue + sources.add(source) + + return sorted(sources) + + +def exported_functions(source): + text = source.read_text(encoding="utf-8", errors="ignore") + text = COMMENT_RE.sub("", text) + + signature = [] + in_preprocessor = False + for line in text.splitlines(): + stripped = line.strip() + + if in_preprocessor or stripped.startswith("#"): + in_preprocessor = stripped.endswith("\\") + continue + + if not signature: + if ( + not stripped + or line[:1].isspace() + or stripped.startswith(("static", "typedef")) + ): + continue + signature = [stripped] + else: + signature.append(stripped) + + joined = " ".join(signature) + before_brace, has_brace, _ = joined.partition("{") + if ";" in before_brace or "=" in before_brace: + signature = [] + continue + if not has_brace: + continue + + match = SIGNATURE_RE.search(before_brace.strip()) + if match: + name = match.group(1) + if name not in SKIP_SYMBOLS and name == name.lower(): + yield name + signature = [] + + +def main(): + parser = argparse.ArgumentParser( + description="Generate a MSVC module definition file for libflint." + ) + parser.add_argument("source_root", type=Path) + parser.add_argument("output", type=Path) + parser.add_argument("--fmpz-source", required=True) + parser.add_argument("--with-fft-small", action="store_true") + args = parser.parse_args() + + symbols = set() + for source in meson_c_sources( + args.source_root, args.with_fft_small, args.fmpz_source + ): + if source.exists(): + symbols.update(exported_functions(source)) + + with args.output.open("w", encoding="utf-8", newline="\n") as output: + output.write("EXPORTS\n") + for symbol in sorted(symbols): + output.write(f" {symbol}\n") + + +if __name__ == "__main__": + main() diff --git a/config/meson.build b/config/meson.build index 86a0722c15..b463310ce3 100644 --- a/config/meson.build +++ b/config/meson.build @@ -1156,6 +1156,11 @@ if pretty_tests_opt.enabled() description: 'Define to enable pretty printing for tests.') endif +if cc.get_argument_syntax() == 'msvc' and get_option('default_library') == 'static' + cfg_data.set('FLINT_STATIC_BUILD', 1, + description: 'Define when building FLINT statically with MSVC.') +endif + # ----------------------------------------------------------------------------- # compiler pragmas # ----------------------------------------------------------------------------- diff --git a/meson.build b/meson.build index b9d20eab21..9abe36c939 100644 --- a/meson.build +++ b/meson.build @@ -68,18 +68,49 @@ endif # Build include directory after list of all source files is complete subdir('include') -libflint = library('flint', c_files_all + headers_all, - dependencies: flint_deps, - include_directories: [headers_built_nodir_inc, 'src'], - install: true, - version: FLINT_LIBRARY_VERSION, - soversion: FLINT_MAJOR_SO, - c_args: [ - '-DBUILDING_FLINT', - '-DFLINT_NOSTDIO', - '-DFLINT_NOSTDARG', - ] + flint_cpu_c_args -) +libflint_c_args = [ + '-DBUILDING_FLINT', + '-DFLINT_NOSTDIO', + '-DFLINT_NOSTDARG', +] + +if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'static' + msvc_def_args = [ + python, + files('config/generate_msvc_def.py'), + meson.project_source_root(), + '@OUTPUT@', + '--fmpz-source', + fmpz_c_in, + ] + if have_fft_small + msvc_def_args += ['--with-fft-small'] + endif + + libflint_def = configure_file( + output: 'flint.def', + command: msvc_def_args, + ) + + libflint = library('flint', c_files_all + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: true, + version: FLINT_LIBRARY_VERSION, + soversion: FLINT_MAJOR_SO, + c_args: libflint_c_args + ['-DFLINT_BUILD_DLL'] + flint_cpu_c_args, + vs_module_defs: libflint_def, + ) +else + libflint = library('flint', c_files_all + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: true, + version: FLINT_LIBRARY_VERSION, + soversion: FLINT_MAJOR_SO, + c_args: libflint_c_args + flint_cpu_c_args, + ) +endif flint_test_dep = declare_dependency( link_with: libflint, diff --git a/src/flint.h.in b/src/flint.h.in index a806ac5e86..a0f23b6d5c 100644 --- a/src/flint.h.in +++ b/src/flint.h.in @@ -36,7 +36,17 @@ #endif #ifndef FLINT_DLL -# define FLINT_DLL +# ifdef _MSC_VER +# if defined(FLINT_STATIC_BUILD) +# define FLINT_DLL +# elif defined(FLINT_BUILD_DLL) +# define FLINT_DLL __declspec(dllexport) +# else +# define FLINT_DLL __declspec(dllimport) +# endif +# else +# define FLINT_DLL +# endif #endif #ifndef alloca From 8052851f49118fe02455d9b55f08260383c60d7a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 09:36:29 +0200 Subject: [PATCH 078/104] Suppress MSVC warning C4146 The MSVC build has many warnings like: warning C4146: unary minus operator applied to unsigned type These are false positives so suppress them. --- config/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/meson.build b/config/meson.build index b463310ce3..5aa93cb961 100644 --- a/config/meson.build +++ b/config/meson.build @@ -473,8 +473,11 @@ gcc_cflags_arch = '' gcc_cflags_tune = '' flint_warning_c_args = cc.get_supported_arguments(gcc_warnings.split()) flint_msvc_c_args = [] -if pthread_opt.enabled() and cc.get_argument_syntax() == 'msvc' - flint_msvc_c_args += cc.get_supported_arguments('/experimental:c11atomics') +if cc.get_argument_syntax() == 'msvc' + flint_msvc_c_args += cc.get_supported_arguments('/wd4146') + if pthread_opt.enabled() + flint_msvc_c_args += cc.get_supported_arguments('/experimental:c11atomics') + endif endif flint_cpu_c_args = [] From 31b418015044c4f0730eb10f3da51c775612fa82 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 09:53:00 +0200 Subject: [PATCH 079/104] CI: Use meson for the coverage job in CI --- .github/workflows/CI.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ba6d7b9691..ce2164ef13 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -131,31 +131,29 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin lcov + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config lcov $CC --version - make --version - autoconf --version - libtool --version + meson --version + ninja --version lcov --version python3 --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} --enable-avx2 --enable-coverage - - name: "Compile library" - run: $MAKE && ldd libflint.so - - name: "Compile tests" - run: $MAKE tests + run: meson setup build -Dtests=enabled -Davx2=enabled -Db_coverage=true + - name: "Compile" + run: meson compile -C build && ldd build/libflint.so - name: "Check" - run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && $MAKE check + run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs - name: "Check Python" - run: $MAKE check PYTHON=1 + run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/build python3 src/python/flint_ctypes.py - name: "Gather coverage data" - run: $MAKE coverage + run: meson compile -C build coverage - name: "Upload coverage data" uses: codecov/codecov-action@v5 if: github.repository == 'flintlib/flint' with: - files: build/coverage/coverage.info + files: build/meson-logs/coverage.info token: ${{ secrets.CODECOV_TOKEN }} regression-check: From f24acb84e21c617cb705a7e6efc102ecde6b8fe6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 09:58:32 +0200 Subject: [PATCH 080/104] meson: generate MSVC exports from public headers --- config/generate_msvc_def.py | 79 ++++++++++++++++++++++--------------- meson.build | 2 - 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/config/generate_msvc_def.py b/config/generate_msvc_def.py index a04f94940b..f2249bc10b 100644 --- a/config/generate_msvc_def.py +++ b/config/generate_msvc_def.py @@ -4,9 +4,8 @@ from pathlib import Path -C_SOURCE_RE = re.compile(r"['\"]([^'\"]+\.c)['\"]") COMMENT_RE = re.compile(r"/\*.*?\*/|//[^\n]*", re.S) -SIGNATURE_RE = re.compile(r"([A-Za-z_]\w*)\s*\([^;{}]*\)\s*$", re.S) +PROTOTYPE_RE = re.compile(r"\b([A-Za-z_]\w*)\s*\([^;{}]*\)\s*;$", re.S) SKIP_SYMBOLS = { "TEMPLATE", "_TEMPLATE", @@ -14,32 +13,42 @@ "TEMPLATE4", "main", } +GMP_INTERNAL_SYMBOLS = { + "mpn_add_nc", + "mpn_addlsh1_n", + "mpn_addlsh1_n_ip1", + "mpn_addmul_2", + "mpn_div_q", + "mpn_gcd_11", + "mpn_invert_limb", + "mpn_modexact_1_odd", + "mpn_rsh1add_n", + "mpn_rsh1sub_n", + "mpn_sub_nc", +} -def meson_c_sources(source_root, with_fft_small, fmpz_source): +def meson_headers(source_root, with_fft_small): src_root = source_root / "src" - sources = {src_root / "fmpz" / "link" / fmpz_source} + headers = set(src_root.glob("*.h")) for meson_build in src_root.glob("*/meson.build"): mod = meson_build.parent.name if mod == "fft_small" and not with_fft_small: continue - text = meson_build.read_text(encoding="utf-8") - for match in C_SOURCE_RE.finditer(text): - source = meson_build.parent / match.group(1) - if "test" in source.parts or "profile" in source.parts: - continue - sources.add(source) + header = src_root / f"{mod}.h" + if header.exists(): + headers.add(header) - return sorted(sources) + return sorted(headers) -def exported_functions(source): - text = source.read_text(encoding="utf-8", errors="ignore") +def exported_functions(header): + text = header.read_text(encoding="utf-8", errors="ignore") text = COMMENT_RE.sub("", text) - signature = [] + declaration = [] in_preprocessor = False for line in text.splitlines(): stripped = line.strip() @@ -48,31 +57,41 @@ def exported_functions(source): in_preprocessor = stripped.endswith("\\") continue - if not signature: + if not declaration: if ( not stripped or line[:1].isspace() - or stripped.startswith(("static", "typedef")) + or stripped.startswith(("static", "typedef", "struct", "enum")) + or "FLINT_INLINE" in stripped + or "FLINT_FORCE_INLINE" in stripped ): continue - signature = [stripped] + declaration = [stripped] else: - signature.append(stripped) + declaration.append(stripped) - joined = " ".join(signature) - before_brace, has_brace, _ = joined.partition("{") - if ";" in before_brace or "=" in before_brace: - signature = [] + joined = " ".join(declaration) + if "{" in joined or "=" in joined or "DECLSPEC_IMPORT" in joined: + declaration = [] + continue + if not joined.endswith(";"): continue - if not has_brace: + + if "static" in joined or "typedef" in joined: + declaration = [] continue - match = SIGNATURE_RE.search(before_brace.strip()) + match = PROTOTYPE_RE.search(joined) if match: name = match.group(1) - if name not in SKIP_SYMBOLS and name == name.lower(): + if ( + name not in SKIP_SYMBOLS + and name not in GMP_INTERNAL_SYMBOLS + and not name.startswith("__gmp") + and name == name.lower() + ): yield name - signature = [] + declaration = [] def main(): @@ -81,16 +100,12 @@ def main(): ) parser.add_argument("source_root", type=Path) parser.add_argument("output", type=Path) - parser.add_argument("--fmpz-source", required=True) parser.add_argument("--with-fft-small", action="store_true") args = parser.parse_args() symbols = set() - for source in meson_c_sources( - args.source_root, args.with_fft_small, args.fmpz_source - ): - if source.exists(): - symbols.update(exported_functions(source)) + for header in meson_headers(args.source_root, args.with_fft_small): + symbols.update(exported_functions(header)) with args.output.open("w", encoding="utf-8", newline="\n") as output: output.write("EXPORTS\n") diff --git a/meson.build b/meson.build index 9abe36c939..d5a84caf02 100644 --- a/meson.build +++ b/meson.build @@ -80,8 +80,6 @@ if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'stat files('config/generate_msvc_def.py'), meson.project_source_root(), '@OUTPUT@', - '--fmpz-source', - fmpz_c_in, ] if have_fft_small msvc_def_args += ['--with-fft-small'] From 34e58e43a712f0a9ce06b163a7ff3b51842b6efb Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 10:36:48 +0200 Subject: [PATCH 081/104] CI: install gcovr for coverage build --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ce2164ef13..b702183a3c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -131,11 +131,12 @@ jobs: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config lcov + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config lcov gcovr $CC --version meson --version ninja --version lcov --version + gcovr --version python3 --version - name: "Generate Meson files" run: python3 update_meson.py From 9e70a8b0f633082f4723e7baf60479e877b89b64 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 10:37:06 +0200 Subject: [PATCH 082/104] meson: Use dumpbin for exported symbols with MSVC --- config/generate_msvc_def.py | 123 ++++++++++++------------------------ meson.build | 34 ++++++---- 2 files changed, 59 insertions(+), 98 deletions(-) diff --git a/config/generate_msvc_def.py b/config/generate_msvc_def.py index f2249bc10b..2055944b56 100644 --- a/config/generate_msvc_def.py +++ b/config/generate_msvc_def.py @@ -1,113 +1,68 @@ #!/usr/bin/env python3 import argparse import re -from pathlib import Path +import subprocess -COMMENT_RE = re.compile(r"/\*.*?\*/|//[^\n]*", re.S) -PROTOTYPE_RE = re.compile(r"\b([A-Za-z_]\w*)\s*\([^;{}]*\)\s*;$", re.S) +DUMPBIN_SYMBOL_RE = re.compile(r"\bExternal\s+\|\s+(\S+)$") +SKIP_PREFIXES = ( + "__imp_", + "__real@", + "__xmm@", + "__ymm@", + "__local_stdio_", +) SKIP_SYMBOLS = { - "TEMPLATE", - "_TEMPLATE", - "TEMPLATE3", - "TEMPLATE4", "main", } -GMP_INTERNAL_SYMBOLS = { - "mpn_add_nc", - "mpn_addlsh1_n", - "mpn_addlsh1_n_ip1", - "mpn_addmul_2", - "mpn_div_q", - "mpn_gcd_11", - "mpn_invert_limb", - "mpn_modexact_1_odd", - "mpn_rsh1add_n", - "mpn_rsh1sub_n", - "mpn_sub_nc", -} - - -def meson_headers(source_root, with_fft_small): - src_root = source_root / "src" - headers = set(src_root.glob("*.h")) - - for meson_build in src_root.glob("*/meson.build"): - mod = meson_build.parent.name - if mod == "fft_small" and not with_fft_small: - continue - - header = src_root / f"{mod}.h" - if header.exists(): - headers.add(header) - return sorted(headers) +def object_symbols(obj): + proc = subprocess.run( + ["dumpbin", "/symbols", obj], + check=True, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True, + encoding="utf-8", + errors="replace", + ) -def exported_functions(header): - text = header.read_text(encoding="utf-8", errors="ignore") - text = COMMENT_RE.sub("", text) - - declaration = [] - in_preprocessor = False - for line in text.splitlines(): - stripped = line.strip() - - if in_preprocessor or stripped.startswith("#"): - in_preprocessor = stripped.endswith("\\") + for line in proc.stdout.splitlines(): + if " UNDEF " in line: continue - if not declaration: - if ( - not stripped - or line[:1].isspace() - or stripped.startswith(("static", "typedef", "struct", "enum")) - or "FLINT_INLINE" in stripped - or "FLINT_FORCE_INLINE" in stripped - ): - continue - declaration = [stripped] - else: - declaration.append(stripped) - - joined = " ".join(declaration) - if "{" in joined or "=" in joined or "DECLSPEC_IMPORT" in joined: - declaration = [] - continue - if not joined.endswith(";"): + match = DUMPBIN_SYMBOL_RE.search(line) + if not match: continue - if "static" in joined or "typedef" in joined: - declaration = [] + symbol = match.group(1) + if ( + symbol in SKIP_SYMBOLS + or symbol.startswith(SKIP_PREFIXES) + or symbol.startswith("$") + or symbol.startswith(".") + or "@" in symbol + or "?" in symbol + ): continue - match = PROTOTYPE_RE.search(joined) - if match: - name = match.group(1) - if ( - name not in SKIP_SYMBOLS - and name not in GMP_INTERNAL_SYMBOLS - and not name.startswith("__gmp") - and name == name.lower() - ): - yield name - declaration = [] + yield symbol def main(): parser = argparse.ArgumentParser( - description="Generate a MSVC module definition file for libflint." + description="Generate a MSVC module definition file from object files." ) - parser.add_argument("source_root", type=Path) - parser.add_argument("output", type=Path) - parser.add_argument("--with-fft-small", action="store_true") + parser.add_argument("output") + parser.add_argument("objects", nargs="+") args = parser.parse_args() symbols = set() - for header in meson_headers(args.source_root, args.with_fft_small): - symbols.update(exported_functions(header)) + for obj in args.objects: + symbols.update(object_symbols(obj)) - with args.output.open("w", encoding="utf-8", newline="\n") as output: + with open(args.output, "w", encoding="utf-8", newline="\n") as output: output.write("EXPORTS\n") for symbol in sorted(symbols): output.write(f" {symbol}\n") diff --git a/meson.build b/meson.build index d5a84caf02..773955a008 100644 --- a/meson.build +++ b/meson.build @@ -75,28 +75,34 @@ libflint_c_args = [ ] if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'static' - msvc_def_args = [ - python, - files('config/generate_msvc_def.py'), - meson.project_source_root(), - '@OUTPUT@', - ] - if have_fft_small - msvc_def_args += ['--with-fft-small'] - endif - - libflint_def = configure_file( + libflint_objects = static_library('flint_objects', c_files_all + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: false, + c_args: libflint_c_args + ['-DFLINT_BUILD_DLL'] + flint_cpu_c_args, + ) + + libflint_object_files = libflint_objects.extract_all_objects(recursive: false) + + libflint_def = custom_target( + 'flint.def', + input: libflint_object_files, output: 'flint.def', - command: msvc_def_args, + command: [ + python, + files('config/generate_msvc_def.py'), + '@OUTPUT@', + '@INPUT@', + ], ) - libflint = library('flint', c_files_all + headers_all, + libflint = shared_library('flint', + objects: libflint_object_files, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], install: true, version: FLINT_LIBRARY_VERSION, soversion: FLINT_MAJOR_SO, - c_args: libflint_c_args + ['-DFLINT_BUILD_DLL'] + flint_cpu_c_args, vs_module_defs: libflint_def, ) else From fa3a141115fca268a3d2913c6a94ca646785033e Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 11:28:37 +0200 Subject: [PATCH 083/104] Use ninja directly to build the coverage target --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b702183a3c..356c190670 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -149,7 +149,7 @@ jobs: - name: "Check Python" run: LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/build python3 src/python/flint_ctypes.py - name: "Gather coverage data" - run: meson compile -C build coverage + run: ninja -C build coverage - name: "Upload coverage data" uses: codecov/codecov-action@v5 if: github.repository == 'flintlib/flint' From f145c1ebbfe94e3108fe0ec090d67a77e1921f09 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 11:43:08 +0200 Subject: [PATCH 084/104] meson: work around Windows command length limits --- config/generate_msvc_def.py | 13 +++++++++++-- meson.build | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/config/generate_msvc_def.py b/config/generate_msvc_def.py index 2055944b56..377d32aa21 100644 --- a/config/generate_msvc_def.py +++ b/config/generate_msvc_def.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import argparse +from pathlib import Path import re import subprocess @@ -55,11 +56,19 @@ def main(): description="Generate a MSVC module definition file from object files." ) parser.add_argument("output") - parser.add_argument("objects", nargs="+") + parser.add_argument("objects", nargs="*") + parser.add_argument("--object-dir") args = parser.parse_args() + objects = list(args.objects) + if args.object_dir: + objects.extend(str(obj) for obj in Path(args.object_dir).rglob("*.obj")) + + if not objects: + raise SystemExit("no object files found") + symbols = set() - for obj in args.objects: + for obj in objects: symbols.update(object_symbols(obj)) with open(args.output, "w", encoding="utf-8", newline="\n") as output: diff --git a/meson.build b/meson.build index 773955a008..120349b4ac 100644 --- a/meson.build +++ b/meson.build @@ -86,14 +86,15 @@ if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'stat libflint_def = custom_target( 'flint.def', - input: libflint_object_files, output: 'flint.def', command: [ python, files('config/generate_msvc_def.py'), '@OUTPUT@', - '@INPUT@', + '--object-dir', + 'libflint_objects.a.p', ], + depends: libflint_objects, ) libflint = shared_library('flint', From 8ba9d64b2b1a3ab45da7569763706707e7e9270d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 12:48:40 +0200 Subject: [PATCH 085/104] CI: use meaon for the regressino check job --- .github/workflows/CI.yml | 17 +++---- meson.build | 18 ++++++++ update_meson.py | 95 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 117 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 356c190670..1c21f8cf52 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -162,23 +162,20 @@ jobs: runs-on: ubuntu-24.04 env: CC: "gcc" - CFLAGS: "-march=native -std=c11 -Wall -Wextra -Werror" - MODULES: "build/thread_pool_merged.lo build/thread_support_merged.lo build/ulong_extras_merged.lo build/long_extras_merged.lo build/perm_merged.lo build/double_extras_merged.lo build/d_vec_merged.lo build/d_mat_merged.lo build/mpn_extras_merged.lo build/nmod_merged.lo build/nmod_vec_merged.lo build/nmod_mat_merged.lo build/nmod_poly_merged.lo build/mpn_mod_merged.lo build/fmpz_merged.lo build/fmpz_vec_merged.lo build/fmpz_mat_merged.lo build/fmpz_poly_merged.lo build/fmpz_mod_merged.lo build/fmpz_mod_vec_merged.lo build/fmpz_mod_mat_merged.lo build/fmpz_mod_poly_merged.lo build/fmpq_merged.lo build/fmpq_vec_merged.lo build/fmpq_mat_merged.lo build/fmpq_poly_merged.lo build/fq_merged.lo build/fq_vec_merged.lo build/fq_mat_merged.lo build/fq_poly_merged.lo build/fq_nmod_merged.lo build/fq_nmod_vec_merged.lo build/fq_nmod_mat_merged.lo build/fq_nmod_poly_merged.lo build/fq_zech_merged.lo build/fq_zech_mat_merged.lo build/fq_zech_poly_merged.lo build/fq_default_merged.lo build/fq_default_mat_merged.lo build/fq_default_poly_merged.lo build/fq_embed_merged.lo build/fq_nmod_embed_merged.lo build/fq_zech_embed_merged.lo build/padic_merged.lo build/padic_mat_merged.lo build/padic_poly_merged.lo build/qadic_merged.lo build/nmod_poly_factor_merged.lo build/fmpz_factor_merged.lo build/fmpz_poly_factor_merged.lo build/fmpz_mod_poly_factor_merged.lo build/fq_poly_factor_merged.lo build/fq_nmod_poly_factor_merged.lo build/fq_zech_poly_factor_merged.lo build/fq_default_poly_factor_merged.lo build/nmod_poly_mat_merged.lo build/fmpz_poly_mat_merged.lo build/mpoly_merged.lo build/nmod_mpoly_merged.lo build/fmpz_mpoly_merged.lo build/fmpz_mod_mpoly_merged.lo build/fmpq_mpoly_merged.lo build/fq_nmod_mpoly_merged.lo build/fq_zech_mpoly_merged.lo build/nmod_mpoly_factor_merged.lo build/fmpz_mpoly_factor_merged.lo build/fmpz_mod_mpoly_factor_merged.lo build/fmpq_mpoly_factor_merged.lo build/fq_nmod_mpoly_factor_merged.lo build/fq_zech_mpoly_factor_merged.lo build/fft_merged.lo build/fft_small_merged.lo" - # Everything until fmpz_poly_q steps: - uses: actions/checkout@v5 - name: "Setup" run: | - sudo apt-get install -y libgmp-dev libmpfr-dev autoconf libtool-bin + sudo apt-get install -y libgmp-dev libmpfr-dev meson ninja-build pkg-config $CC --version - make --version - autoconf --version - libtool --version - echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV + meson --version + ninja --version + - name: "Generate Meson files" + run: python3 update_meson.py - name: "Configure" - run: ./bootstrap.sh && ./configure CC=${CC} CFLAGS="${CFLAGS}" --disable-debug + run: meson setup build -Dtests=disabled - name: "Check regression in a subset of modules" - run: $MAKE $MODULES + run: meson compile -C build regression-check ubuntu-arm: name: Meson, ARM (x0.5) diff --git a/meson.build b/meson.build index 120349b4ac..6897c33671 100644 --- a/meson.build +++ b/meson.build @@ -74,6 +74,24 @@ libflint_c_args = [ '-DFLINT_NOSTDARG', ] +regression_c_args = libflint_c_args + flint_cpu_c_args + cc.get_supported_arguments([ + '-march=native', + '-Wall', + '-Wextra', + '-Werror', +]) + +regression_lib = static_library('flint_regression_check', + regression_c_files + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: false, + build_by_default: false, + c_args: regression_c_args, +) + +alias_target('regression-check', regression_lib) + if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'static' libflint_objects = static_library('flint_objects', c_files_all + headers_all, dependencies: flint_deps, diff --git a/update_meson.py b/update_meson.py index abb949d413..3c61cab254 100755 --- a/update_meson.py +++ b/update_meson.py @@ -95,6 +95,81 @@ 'fq_vec_templates', ] +regression_modules = [ + 'thread_pool', + 'thread_support', + 'ulong_extras', + 'long_extras', + 'perm', + 'double_extras', + 'd_vec', + 'd_mat', + 'mpn_extras', + 'nmod', + 'nmod_vec', + 'nmod_mat', + 'nmod_poly', + 'mpn_mod', + 'fmpz', + 'fmpz_vec', + 'fmpz_mat', + 'fmpz_poly', + 'fmpz_mod', + 'fmpz_mod_vec', + 'fmpz_mod_mat', + 'fmpz_mod_poly', + 'fmpq', + 'fmpq_vec', + 'fmpq_mat', + 'fmpq_poly', + 'fq', + 'fq_vec', + 'fq_mat', + 'fq_poly', + 'fq_nmod', + 'fq_nmod_vec', + 'fq_nmod_mat', + 'fq_nmod_poly', + 'fq_zech', + 'fq_zech_mat', + 'fq_zech_poly', + 'fq_default', + 'fq_default_mat', + 'fq_default_poly', + 'fq_embed', + 'fq_nmod_embed', + 'fq_zech_embed', + 'padic', + 'padic_mat', + 'padic_poly', + 'qadic', + 'nmod_poly_factor', + 'fmpz_factor', + 'fmpz_poly_factor', + 'fmpz_mod_poly_factor', + 'fq_poly_factor', + 'fq_nmod_poly_factor', + 'fq_zech_poly_factor', + 'fq_default_poly_factor', + 'nmod_poly_mat', + 'fmpz_poly_mat', + 'mpoly', + 'nmod_mpoly', + 'fmpz_mpoly', + 'fmpz_mod_mpoly', + 'fmpq_mpoly', + 'fq_nmod_mpoly', + 'fq_zech_mpoly', + 'nmod_mpoly_factor', + 'fmpz_mpoly_factor', + 'fmpz_mod_mpoly_factor', + 'fmpq_mpoly_factor', + 'fq_nmod_mpoly_factor', + 'fq_zech_mpoly_factor', + 'fft', + 'fft_small', +] + src_meson_build = '''\ # # This file is generated automatically. @@ -119,12 +194,19 @@ %s ] +regression_modules = [ +%s +] + headers_all = [] c_files_all = [] +regression_c_files = [] mod_tests = [] # Select the right version of fmpz.c (see configuration) -c_files_all += files('fmpz/link' / fmpz_c_in) +fmpz_link_c_file = files('fmpz/link' / fmpz_c_in) +c_files_all += fmpz_link_c_file +regression_c_files += fmpz_link_c_file foreach mod : modules subdir(mod) @@ -162,9 +244,15 @@ # python update_meson.py # -c_files_all += files( +module_c_files = files( %s ) + +c_files_all += module_c_files + +if '%s' in regression_modules + regression_c_files += module_c_files +endif ''' test_mod_meson_build = '''\ @@ -360,6 +448,7 @@ def main(args): format_lines(mod_no_header), format_lines(mod_no_tests), format_lines(head_no_dir), + format_lines(regression_modules), ) dst_path = join(output_dir, 'src', 'meson.build') if not args.quiet: @@ -374,7 +463,7 @@ def main(args): c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] if mod == 'fmpz': c_files = [f for f in c_files if f != 'fmpz.c'] - src_mod_meson_build_text = src_mod_meson_build % format_lines(c_files) + src_mod_meson_build_text = src_mod_meson_build % (format_lines(c_files), mod) dst_path = join(mod_dir, 'meson.build') if args.verbose: print('Writing %s' % dst_path) From 9bcf18920da093853ffae49fd0be5faa99851387 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 13:00:32 +0200 Subject: [PATCH 086/104] CI: regression-check use -O0 This is to try to avoid a warning (treated as error) from mpn_mod_poly/divrem_q1_preinv1.c --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index 6897c33671..47ecdc263e 100644 --- a/meson.build +++ b/meson.build @@ -88,6 +88,7 @@ regression_lib = static_library('flint_regression_check', install: false, build_by_default: false, c_args: regression_c_args, + override_options: ['optimization=0'], ) alias_target('regression-check', regression_lib) From 165116bbc562a409b8fcbb9f5e07b2a87aa375b7 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 14:26:13 +0200 Subject: [PATCH 087/104] meson: add -Wmissing-prototypes --- config/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 5aa93cb961..6224248f0b 100644 --- a/config/meson.build +++ b/config/meson.build @@ -467,7 +467,7 @@ message('EXACT CPU:', exact_cpu) ################################################################################ gcc_cflags = '-O3 -pedantic -std=c11' -gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wno-deprecated-declarations' +gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wmissing-prototypes -Wno-deprecated-declarations' gcc_cflags_optlist = '' gcc_cflags_arch = '' gcc_cflags_tune = '' From 0ee03f0c8ebfc785ad859b62a092c65fb08a877a Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 16:16:18 +0200 Subject: [PATCH 088/104] meson: try to match compiler flags with autotools --- config/meson.build | 5 +- meson.build | 114 ++++++++++++++++++++++++++++++++++++++++----- update_meson.py | 106 ++++++++++++++++++++++++++++++++++------- 3 files changed, 195 insertions(+), 30 deletions(-) diff --git a/config/meson.build b/config/meson.build index 6224248f0b..55bc8119a5 100644 --- a/config/meson.build +++ b/config/meson.build @@ -467,11 +467,14 @@ message('EXACT CPU:', exact_cpu) ################################################################################ gcc_cflags = '-O3 -pedantic -std=c11' -gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wmissing-prototypes -Wno-deprecated-declarations' +gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wno-deprecated-declarations' +gcc_library_warnings = '-Wmissing-prototypes' gcc_cflags_optlist = '' gcc_cflags_arch = '' gcc_cflags_tune = '' flint_warning_c_args = cc.get_supported_arguments(gcc_warnings.split()) +flint_library_warning_c_args = cc.get_supported_arguments(gcc_library_warnings.split()) +flint_unroll_loops_c_args = cc.get_supported_arguments('-funroll-loops') flint_msvc_c_args = [] if cc.get_argument_syntax() == 'msvc' flint_msvc_c_args += cc.get_supported_arguments('/wd4146') diff --git a/meson.build b/meson.build index 47ecdc263e..36f5942914 100644 --- a/meson.build +++ b/meson.build @@ -19,6 +19,9 @@ FLINT_LIBRARY_VERSION = '.'.join([FLINT_MAJOR_SO, FLINT_MINOR_SO, FLINT_PATCH_SO cc = meson.get_compiler('c') fs = import('fs') +default_library_opt = get_option('default_library') +build_shared_library = default_library_opt in ['shared', 'both'] +build_static_library = default_library_opt in ['static', 'both'] m_dep = cc.find_library('m', required: false) @@ -60,11 +63,19 @@ if have_assembly configuration: asm_cfg, ) - s_files = [] + s_files_static = [] + s_files_shared = [] subdir('src' / assembly_dir) - c_files_all += s_files +else + s_files_static = [] + s_files_shared = [] endif +c_files_static_all = c_files_all + s_files_static +c_files_shared_all = c_files_all + s_files_shared +c_files_static = c_files_missing_prototypes + s_files_static +c_files_shared = c_files_missing_prototypes + s_files_shared + # Build include directory after list of all source files is complete subdir('include') @@ -74,6 +85,51 @@ libflint_c_args = [ '-DFLINT_NOSTDARG', ] +libflint_shared_link_whole = [] +libflint_static_link_whole = [] + +if cc.get_argument_syntax() != 'msvc' + foreach bucket : [ + ['no_missing_prototypes', + c_files_no_missing_prototypes, + libflint_c_args + flint_cpu_c_args], + ['unroll', + c_files_missing_prototypes_unroll, + libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args + flint_unroll_loops_c_args], + ['no_missing_prototypes_unroll', + c_files_no_missing_prototypes_unroll, + libflint_c_args + flint_cpu_c_args + flint_unroll_loops_c_args], + ] + bucket_name = bucket[0] + bucket_sources = bucket[1] + bucket_c_args = bucket[2] + + if bucket_sources.length() > 0 + if build_shared_library + libflint_shared_link_whole += [static_library('flint_' + bucket_name + '_shared', + bucket_sources + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: false, + pic: true, + c_args: bucket_c_args, + )] + endif + + if build_static_library + libflint_static_link_whole += [static_library('flint_' + bucket_name + '_static', + bucket_sources + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: false, + pic: false, + c_args: bucket_c_args, + )] + endif + endif + endforeach +endif + regression_c_args = libflint_c_args + flint_cpu_c_args + cc.get_supported_arguments([ '-march=native', '-Wall', @@ -93,12 +149,12 @@ regression_lib = static_library('flint_regression_check', alias_target('regression-check', regression_lib) -if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'static' - libflint_objects = static_library('flint_objects', c_files_all + headers_all, +if cc.get_argument_syntax() == 'msvc' and build_shared_library + libflint_objects = static_library('flint_objects', c_files_shared_all + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], install: false, - c_args: libflint_c_args + ['-DFLINT_BUILD_DLL'] + flint_cpu_c_args, + c_args: libflint_c_args + ['-DFLINT_BUILD_DLL'] + flint_cpu_c_args + flint_library_warning_c_args, ) libflint_object_files = libflint_objects.extract_all_objects(recursive: false) @@ -116,7 +172,7 @@ if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'stat depends: libflint_objects, ) - libflint = shared_library('flint', + libflint_shared = shared_library('flint', objects: libflint_object_files, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], @@ -125,15 +181,51 @@ if cc.get_argument_syntax() == 'msvc' and get_option('default_library') != 'stat soversion: FLINT_MAJOR_SO, vs_module_defs: libflint_def, ) -else - libflint = library('flint', c_files_all + headers_all, + + if build_static_library + libflint_static = static_library('flint', c_files_static_all + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + install: true, + c_args: libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args, + ) + endif + + libflint = libflint_shared +elif cc.get_argument_syntax() == 'msvc' + libflint = static_library('flint', c_files_static_all + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], install: true, - version: FLINT_LIBRARY_VERSION, - soversion: FLINT_MAJOR_SO, - c_args: libflint_c_args + flint_cpu_c_args, + c_args: libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args, ) +else + if build_shared_library + libflint_shared = shared_library('flint', c_files_shared + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + link_whole: libflint_shared_link_whole, + install: true, + version: FLINT_LIBRARY_VERSION, + soversion: FLINT_MAJOR_SO, + c_args: libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args, + ) + libflint = libflint_shared + endif + + if build_static_library + libflint_static = static_library('flint', c_files_static + headers_all, + dependencies: flint_deps, + include_directories: [headers_built_nodir_inc, 'src'], + link_whole: libflint_static_link_whole, + install: true, + c_args: libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args, + ) + + if not build_shared_library + libflint = libflint_static + endif + endif endif flint_test_dep = declare_dependency( diff --git a/update_meson.py b/update_meson.py index 3c61cab254..b6831dc0d3 100755 --- a/update_meson.py +++ b/update_meson.py @@ -29,6 +29,30 @@ 'fft_small', ] +template_modules = [ + 'fq_templates', + 'fq_embed_templates', + 'fq_poly_templates', + 'fq_poly_factor_templates', + 'fq_mat_templates', + 'fq_vec_templates', +] + +test_only_modules = [ + 'fq_zech_vec', +] + +non_library_modules = template_modules + test_only_modules + +unroll_modules = [ + 'ulong_extras', + 'nmod', + 'nmod_vec', + 'nmod_mat', + 'nmod_poly', + 'arith', +] + # Modules that do not have a corresponding header file mod_no_header = [ 'generic_files', @@ -67,7 +91,7 @@ 'profiler', 'templates', 'test_helpers', -] +] + non_library_modules headers_skip = [ 'flint', @@ -86,13 +110,6 @@ 'fq_zech_mpoly_factor', 'generic_files', 'hypgeom', - # Template tests are included by the concrete fq_nmod/fq_zech modules. - 'fq_templates', - 'fq_embed_templates', - 'fq_poly_templates', - 'fq_poly_factor_templates', - 'fq_mat_templates', - 'fq_vec_templates', ] regression_modules = [ @@ -198,14 +215,23 @@ %s ] +unroll_modules = [ +%s +] + headers_all = [] c_files_all = [] +c_files_missing_prototypes = [] +c_files_missing_prototypes_unroll = [] +c_files_no_missing_prototypes = [] +c_files_no_missing_prototypes_unroll = [] regression_c_files = [] mod_tests = [] # Select the right version of fmpz.c (see configuration) fmpz_link_c_file = files('fmpz/link' / fmpz_c_in) c_files_all += fmpz_link_c_file +c_files_missing_prototypes += fmpz_link_c_file regression_c_files += fmpz_link_c_file foreach mod : modules @@ -233,6 +259,12 @@ mod_tests += ['interfaces/test'] endif +foreach mod : [ +%s +] + mod_tests += [mod / 'test'] +endforeach + headers_all = files(headers_all) ''' @@ -248,10 +280,24 @@ %s ) +module_c_files_no_missing_prototypes = files( +%s +) + c_files_all += module_c_files +c_files_all += module_c_files_no_missing_prototypes + +if '%s' in unroll_modules + c_files_missing_prototypes_unroll += module_c_files + c_files_no_missing_prototypes_unroll += module_c_files_no_missing_prototypes +else + c_files_missing_prototypes += module_c_files + c_files_no_missing_prototypes += module_c_files_no_missing_prototypes +endif if '%s' in regression_modules regression_c_files += module_c_files + regression_c_files += module_c_files_no_missing_prototypes endif ''' @@ -370,14 +416,29 @@ m4_prog = find_program('m4', native: true) foreach asm_file: asm_files - s_filename = fs.stem(asm_file) + '.s' - s_file = custom_target(s_filename, - input: [asm_file, config_m4] + asm_deps, - output: s_filename, - command: [m4_prog, '-I', meson.project_build_root(), '@INPUT0@'], - capture: true, - ) - s_files += [s_file] + asm_stem = fs.stem(asm_file) + + if default_library_opt in ['static', 'both'] + s_filename = asm_stem + '.s' + s_file = custom_target(s_filename, + input: [asm_file, config_m4] + asm_deps, + output: s_filename, + command: [m4_prog, '-I', meson.project_build_root(), '@INPUT0@'], + capture: true, + ) + s_files_static += [s_file] + endif + + if default_library_opt in ['shared', 'both'] + s_pic_filename = asm_stem + '_pic.s' + s_pic_file = custom_target(s_pic_filename, + input: [asm_file, config_m4] + asm_deps, + output: s_pic_filename, + command: [m4_prog, '-I', meson.project_build_root(), '-DPIC', '@INPUT0@'], + capture: true, + ) + s_files_shared += [s_pic_file] + endif endforeach ''' @@ -440,7 +501,7 @@ def main(args): # We will generate the meson.build file for conditional modules but the # main meson.build file will decide whether to include them or not. - modules_unconditional = set(modules) - set(conditional_modules) + modules_unconditional = set(modules) - set(conditional_modules) - set(non_library_modules) # src/meson.build src_meson_build_text = src_meson_build % ( @@ -449,6 +510,8 @@ def main(args): format_lines(mod_no_tests), format_lines(head_no_dir), format_lines(regression_modules), + format_lines(unroll_modules), + format_lines(test_only_modules), ) dst_path = join(output_dir, 'src', 'meson.build') if not args.quiet: @@ -463,7 +526,14 @@ def main(args): c_files = [f for f in listdir(mod_dir) if f.endswith('.c')] if mod == 'fmpz': c_files = [f for f in c_files if f != 'fmpz.c'] - src_mod_meson_build_text = src_mod_meson_build % (format_lines(c_files), mod) + c_files_no_missing_prototypes = [f for f in c_files if f == 'inlines.c'] + c_files = [f for f in c_files if f not in c_files_no_missing_prototypes] + src_mod_meson_build_text = src_mod_meson_build % ( + format_lines(c_files), + format_lines(c_files_no_missing_prototypes), + mod, + mod, + ) dst_path = join(mod_dir, 'meson.build') if args.verbose: print('Writing %s' % dst_path) From 9958f448d1a0f0b91d415c2c5bc64e085d46b3dc Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 16:17:05 +0200 Subject: [PATCH 089/104] tmp: add debug scripts for checking command line flags --- capture_autotools_commands.sh | 14 ++ compare_build_commands.py | 375 ++++++++++++++++++++++++++++++++++ 2 files changed, 389 insertions(+) create mode 100755 capture_autotools_commands.sh create mode 100644 compare_build_commands.py diff --git a/capture_autotools_commands.sh b/capture_autotools_commands.sh new file mode 100755 index 0000000000..1e992e5ff3 --- /dev/null +++ b/capture_autotools_commands.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Run with any make arguments e.g.: +# ./capture_autotools_commands.sh -j10 + +set -eu + +make clean +./bootstrap.sh +./configure +echo :::::::::::::::::::: +echo :::::::::::::::::::: +echo :::::::::::::::::::: +make V=1 "$@" > autotools_commands.txt diff --git a/compare_build_commands.py b/compare_build_commands.py new file mode 100644 index 0000000000..a39e1dd884 --- /dev/null +++ b/compare_build_commands.py @@ -0,0 +1,375 @@ +#!/usr/bin/env python3 +import argparse +import json +import os +import shlex +import sys +from collections import Counter, defaultdict +from pathlib import Path + + +SOURCE_EXTS = ('.c', '.cc', '.cpp', '.cxx', '.S', '.s') + + +def canonical_generated_source(path): + parts = Path(path).parts + for i, part in enumerate(parts): + if part == 'mpn_extras' and i + 2 < len(parts): + rel = Path(*parts[i:]).as_posix() + if rel.endswith('.s'): + return 'generated/' + rel + return None + + +def split_command(command): + return shlex.split(command, posix=(os.name != 'nt')) + + +def normalise_source(path, base): + p = Path(path) + if not p.is_absolute(): + p = (base / p) + try: + source = p.resolve().relative_to(Path.cwd().resolve()).as_posix() + except ValueError: + source = p.resolve().as_posix() + + generated = canonical_generated_source(source) + if generated is not None: + return generated + return source + + +def source_from_argv(argv, base): + for i, arg in enumerate(argv): + if arg == '-c' and i + 1 < len(argv): + return normalise_source(argv[i + 1], base) + + for arg in argv: + if arg.endswith(SOURCE_EXTS): + return normalise_source(arg, base) + + return None + + +def source_is_assembly(source): + return source.endswith('.s') or source.endswith('.S') + + +def is_compile_command(argv): + return '-c' in argv and any(arg.endswith(SOURCE_EXTS) for arg in argv) + + +def normalise_path_arg(arg, base): + if arg.startswith('-I') and len(arg) > 2: + prefix, path = '-I', arg[2:] + else: + prefix, path = '', arg + + p = Path(path) + if not p.is_absolute(): + p = base / p + try: + path = p.resolve().relative_to(Path.cwd().resolve()).as_posix() + except ValueError: + path = p.resolve().as_posix() + + return prefix + path + + +def normalise_relative_path(path): + p = Path(path) + if not p.is_absolute(): + p = Path.cwd() / p + try: + return p.resolve().relative_to(Path.cwd().resolve()).as_posix() + except ValueError: + return p.resolve().as_posix() + + +def is_ignored_include(include, build_dir=None): + if not include.startswith('-I'): + return False + if build_dir is None: + return False + + path = include[2:] + parts = Path(path).parts + build_parts = Path(build_dir).parts + if len(parts) < len(build_parts) + 1: + return False + + # Meson adds a private include directory for each target's object files + # (for example build/libflint.24.dylib.p). These are implementation + # details of the target split and do not correspond to autotools flags. + after_build = parts[len(build_parts):] + if parts[:len(build_parts)] != build_parts: + return False + + if after_build[0].startswith('libflint') and after_build[0].endswith('.p'): + return True + + # The generated assembly subdirectory is added only to the main library + # target. It is not relevant to C source comparison, and otherwise splits + # the inlines.c objects into a separate difference group. + return len(after_build) >= 3 and after_build[0] == 'src' and after_build[1] == 'mpn_extras' + + +def classify_args(argv, base, build_dir=None): + includes = [] + defines = [] + flags = [] + + skip_next = False + compiler_seen = False + options_with_arg = {'-o', '-MF', '-MQ', '-MT', '-x'} + ignored_flags = { + '-c', + '-MMD', + '-MD', + '-MP', + '-fdiagnostics-color=always', + } + + for i, arg in enumerate(argv): + if skip_next: + skip_next = False + continue + + if not compiler_seen: + compiler_seen = True + continue + + if arg in options_with_arg: + skip_next = True + continue + + if i > 0 and argv[i - 1] == '-c': + continue + + if arg.endswith(SOURCE_EXTS): + continue + + if arg in ignored_flags: + continue + + if arg == '-I' and i + 1 < len(argv): + include = normalise_path_arg(argv[i + 1], base) + if not is_ignored_include(include, build_dir): + includes.append(include) + skip_next = True + continue + + if arg.startswith('-I'): + include = normalise_path_arg(arg, base) + if not is_ignored_include(include, build_dir): + includes.append(include) + continue + + if arg == '-D' and i + 1 < len(argv): + defines.append('-D' + argv[i + 1]) + skip_next = True + continue + + if arg.startswith('-D'): + defines.append(arg) + continue + + flags.append(arg) + + return { + 'includes': includes, + 'defines': defines, + 'flags': flags, + } + + +def counter_diff(left, right): + left_counter = Counter(left) + right_counter = Counter(right) + only_left = list((left_counter - right_counter).elements()) + only_right = list((right_counter - left_counter).elements()) + return tuple(sorted(only_left)), tuple(sorted(only_right)) + + +def command_record(command, base, build_dir=None): + argv = split_command(command) + if not is_compile_command(argv): + return None + + source = source_from_argv(argv, base) + if source is None: + return None + + return { + 'source': source, + 'argv': argv, + 'parts': classify_args(argv, base, build_dir), + 'raw': command, + } + + +def read_autotools_commands(path): + records = {} + base = Path.cwd() + + for line in path.read_text(errors='replace').splitlines(): + line = line.strip() + if not line: + continue + + try: + record = command_record(line, base) + except ValueError: + continue + + if record is not None: + records.setdefault(record['source'], record) + + return records + + +def meson_command_is_default_library(record): + source = record['source'] + output = record.get('output', '') + + if not (source.startswith('src/') or source.startswith('generated/mpn_extras/')): + return False + if '/test/' in source or source.startswith('examples/'): + return False + if 'regression_check' in output: + return False + if '.exe.p' in output or '/test/' in output or 'examples/' in output: + return False + + return output.startswith('libflint') or '/libflint' in output + + +def read_meson_commands(build_dir): + path = build_dir / 'compile_commands.json' + if not path.exists(): + raise SystemExit(f'{path} does not exist. Run meson setup first.') + + data = json.loads(path.read_text()) + all_records = {} + selected = {} + build_dir_rel = normalise_relative_path(build_dir) + + for entry in data: + command = entry.get('command') + if command is None and 'arguments' in entry: + command = shlex.join(entry['arguments']) + if command is None: + continue + + base = Path(entry.get('directory', build_dir)) + record = command_record(command, base, build_dir_rel) + if record is None: + continue + + record['output'] = entry.get('output', '') + all_records.setdefault(record['source'], record) + + if meson_command_is_default_library(record): + selected.setdefault(record['source'], record) + + return selected, all_records + + +def print_list(title, items, max_items=None): + print(title) + if not items: + print(' none') + return + printed_items = items if max_items is None else items[:max_items] + for item in printed_items: + print(f' {item}') + if max_items is not None and len(items) > max_items: + print(f' ... {len(items) - max_items} more') + + +def format_tuple(values): + if not values: + return 'none' + return ' '.join(values) + + +def main(): + parser = argparse.ArgumentParser( + description='Compare autotools and Meson compile commands by source file.') + parser.add_argument('build_dir', type=Path) + parser.add_argument('autotools_commands', type=Path) + parser.add_argument( + '--max-sources', + type=int, + default=None, + help='limit the number of sources printed for each difference group') + args = parser.parse_args() + + autotools = read_autotools_commands(args.autotools_commands) + meson, meson_all = read_meson_commands(args.build_dir) + + autotools_sources = set(autotools) + meson_sources = set(meson) + matched = sorted(autotools_sources & meson_sources) + only_autotools = sorted(autotools_sources - meson_sources) + only_meson = sorted(meson_sources - autotools_sources) + + print(f'Autotools compile commands: {len(autotools)}') + print(f'Meson default-library compile commands: {len(meson)}') + print(f'Meson compile commands before filtering: {len(meson_all)}') + print(f'Matched sources: {len(matched)}') + print() + + print_list('Only in autotools:', only_autotools, args.max_sources) + print() + print_list('Only in Meson default library:', only_meson, args.max_sources) + print() + + groups = defaultdict(list) + same = 0 + + for source in matched: + if source_is_assembly(source): + same += 1 + continue + + auto = autotools[source]['parts'] + mes = meson[source]['parts'] + diff = ( + counter_diff(auto['flags'], mes['flags']), + counter_diff(auto['defines'], mes['defines']), + counter_diff(auto['includes'], mes['includes']), + ) + + if diff == (((), ()), ((), ()), ((), ())): + same += 1 + else: + groups[diff].append(source) + + print(f'Sources with no normalized argument differences: {same}') + print(f'Difference groups: {len(groups)}') + print() + + for idx, (diff, sources) in enumerate(sorted(groups.items(), key=lambda x: (-len(x[1]), x[1][0])), 1): + (flags_auto, flags_meson), (defs_auto, defs_meson), (incs_auto, incs_meson) = diff + print(f'Group {idx}: {len(sources)} source(s)') + print(f' flags only in autotools: {format_tuple(flags_auto)}') + print(f' flags only in Meson: {format_tuple(flags_meson)}') + print(f' defines only in autotools: {format_tuple(defs_auto)}') + print(f' defines only in Meson: {format_tuple(defs_meson)}') + print(f' includes only in autotools: {format_tuple(incs_auto)}') + print(f' includes only in Meson: {format_tuple(incs_meson)}') + print(' sources:') + printed_sources = sources + if args.max_sources is not None: + printed_sources = sources[:args.max_sources] + for source in printed_sources: + print(f' {source}') + if args.max_sources is not None and len(sources) > args.max_sources: + print(f' ... {len(sources) - args.max_sources} more') + print() + + +if __name__ == '__main__': + sys.exit(main()) From 11538be8a079fbad0363cde73dc83527a7ded25b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Thu, 18 Jun 2026 19:26:38 +0200 Subject: [PATCH 090/104] meson: use -pedantic to match autotools --- config/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index 55bc8119a5..a624245c1f 100644 --- a/config/meson.build +++ b/config/meson.build @@ -467,7 +467,7 @@ message('EXACT CPU:', exact_cpu) ################################################################################ gcc_cflags = '-O3 -pedantic -std=c11' -gcc_warnings = '-Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wno-deprecated-declarations' +gcc_warnings = '-pedantic -Werror=implicit-function-declaration -Werror=newline-eof -Wno-stringop-overread -Wno-stringop-overflow -Wno-deprecated-declarations' gcc_library_warnings = '-Wmissing-prototypes' gcc_cflags_optlist = '' gcc_cflags_arch = '' From c5885c1f1ed7c97367f66d4a7fbf43b0c163b306 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 09:35:26 +0200 Subject: [PATCH 091/104] meson: add profile target to build profile executables --- meson.build | 8 +++++ meson.options | 2 ++ update_meson.py | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) diff --git a/meson.build b/meson.build index 36f5942914..aac2ce94cf 100644 --- a/meson.build +++ b/meson.build @@ -241,6 +241,14 @@ if not examples_opt.disabled() subdir('examples') endif +profiles_opt = get_option('profiles') +if not profiles_opt.disabled() + foreach mod_profile : mod_profiles + subdir('src' / mod_profile) + endforeach + alias_target('profile', profile_exes) +endif + tests_opt = get_option('tests') if not tests_opt.disabled() foreach mod_test : mod_tests diff --git a/meson.options b/meson.options index cc684a72d6..5d62fadca7 100644 --- a/meson.options +++ b/meson.options @@ -2,6 +2,8 @@ option('tests', type : 'feature', value : 'auto', description: 'Configure tests; enabled also builds them by default') option('examples', type : 'feature', value : 'disabled', description: 'Configure example programs; enabled also builds and tests them by default') +option('profiles', type : 'feature', value : 'disabled', + description: 'Configure profile/benchmark programs; enabled also builds them by default') option('libtool_lock', type : 'feature', value : 'enabled', description: 'Use libtool lock') option('pthread', type : 'feature', value : 'enabled', diff --git a/update_meson.py b/update_meson.py index b6831dc0d3..c311e7acb0 100755 --- a/update_meson.py +++ b/update_meson.py @@ -112,6 +112,9 @@ 'hypgeom', ] +mod_no_profiles = [ +] + regression_modules = [ 'thread_pool', 'thread_support', @@ -219,6 +222,14 @@ %s ] +profile_modules = [ +%s +] + +conditional_profile_modules = [ +%s +] + headers_all = [] c_files_all = [] c_files_missing_prototypes = [] @@ -227,6 +238,8 @@ c_files_no_missing_prototypes_unroll = [] regression_c_files = [] mod_tests = [] +mod_profiles = [] +profile_exes = [] # Select the right version of fmpz.c (see configuration) fmpz_link_c_file = files('fmpz/link' / fmpz_c_in) @@ -252,6 +265,7 @@ if have_fft_small subdir('fft_small') mod_tests += ['fft_small/test'] + mod_profiles += conditional_profile_modules headers_all += ['fft_small.h'] endif @@ -265,6 +279,8 @@ mod_tests += [mod / 'test'] endforeach +mod_profiles += profile_modules + headers_all = files(headers_all) ''' @@ -318,6 +334,28 @@ test('%s', test_exe, timeout: 0) ''' +profile_mod_meson_build = '''\ +# This file is generated automatically. +# +# To regenerate it, run: +# python update_meson.py +# + +foreach profile_source : [ +%s +] + profile_stem = fs.stem(profile_source) + profile_exes += executable( + profile_stem, + profile_source, + dependencies: [flint_test_dep], + include_directories: [headers_built_inc], + install: false, + build_by_default: profiles_opt.enabled(), + ) +endforeach +''' + test_mod_NTL_meson_build = '''\ # This file is generated automatically. @@ -504,6 +542,39 @@ def main(args): modules_unconditional = set(modules) - set(conditional_modules) - set(non_library_modules) # src/meson.build + top_profile_dir = join(output_dir, 'src', 'profile') + top_profile_sources = [] + if isdir(top_profile_dir): + top_profile_sources = [ + f for f in listdir(top_profile_dir) + if f.endswith('.c') + ] + profile_modules = [] + if top_profile_sources: + profile_modules.append('profile') + conditional_profile_modules = [] + profile_scan_modules = ( + set(modules) - set(non_library_modules) - set(conditional_modules) + ) | set(mod_no_header) + for mod in profile_scan_modules: + profile_dir = join(output_dir, 'src', mod, 'profile') + if mod not in mod_no_profiles and isdir(profile_dir): + profile_c_files = [ + f for f in listdir(profile_dir) + if f.endswith('.c') + ] + if profile_c_files: + profile_modules.append(mod + '/profile') + for mod in conditional_modules: + profile_dir = join(output_dir, 'src', mod, 'profile') + if mod not in mod_no_profiles and isdir(profile_dir): + profile_c_files = [ + f for f in listdir(profile_dir) + if f.endswith('.c') + ] + if profile_c_files: + conditional_profile_modules.append(mod + '/profile') + src_meson_build_text = src_meson_build % ( format_lines(modules_unconditional), format_lines(mod_no_header), @@ -511,6 +582,8 @@ def main(args): format_lines(head_no_dir), format_lines(regression_modules), format_lines(unroll_modules), + format_lines(profile_modules), + format_lines(conditional_profile_modules), format_lines(test_only_modules), ) dst_path = join(output_dir, 'src', 'meson.build') @@ -548,6 +621,19 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, test_mod_meson_build_text) + # src/mod/profile/meson.build + profile_dir = join(mod_dir, 'profile') + if mod not in mod_no_profiles and isdir(profile_dir): + profile_c_files = [f for f in listdir(profile_dir) if f.endswith('.c')] + if profile_c_files: + profile_mod_meson_build_text = profile_mod_meson_build % ( + format_lines(profile_c_files), + ) + dst_path = join(profile_dir, 'meson.build') + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, profile_mod_meson_build_text) + # Build for the NTL tests dst_path = join(output_dir, 'src', 'interfaces', 'test', 'meson.build') test_mod_meson_build_text = test_mod_NTL_meson_build % 'NTL-interface' @@ -567,6 +653,16 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, examples_meson_build_text) + # src/profile/meson.build + if top_profile_sources: + profile_mod_meson_build_text = profile_mod_meson_build % ( + format_lines(top_profile_sources), + ) + dst_path = join(top_profile_dir, 'meson.build') + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, profile_mod_meson_build_text) + # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: asm_dir = join(output_dir, 'src', path) From 03efe0ee6ebafe19cc7725cf0431e43540488655 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 10:01:22 +0200 Subject: [PATCH 092/104] meson: add tunes build target --- meson.build | 8 +++++ meson.options | 2 ++ update_meson.py | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) diff --git a/meson.build b/meson.build index aac2ce94cf..c9508d2feb 100644 --- a/meson.build +++ b/meson.build @@ -249,6 +249,14 @@ if not profiles_opt.disabled() alias_target('profile', profile_exes) endif +tunes_opt = get_option('tunes') +if not tunes_opt.disabled() + foreach mod_tune : mod_tunes + subdir('src' / mod_tune) + endforeach + alias_target('tune', tune_exes) +endif + tests_opt = get_option('tests') if not tests_opt.disabled() foreach mod_test : mod_tests diff --git a/meson.options b/meson.options index 5d62fadca7..0304d2f1c4 100644 --- a/meson.options +++ b/meson.options @@ -4,6 +4,8 @@ option('examples', type : 'feature', value : 'disabled', description: 'Configure example programs; enabled also builds and tests them by default') option('profiles', type : 'feature', value : 'disabled', description: 'Configure profile/benchmark programs; enabled also builds them by default') +option('tunes', type : 'feature', value : 'disabled', + description: 'Configure tune programs; enabled also builds them by default') option('libtool_lock', type : 'feature', value : 'enabled', description: 'Use libtool lock') option('pthread', type : 'feature', value : 'enabled', diff --git a/update_meson.py b/update_meson.py index c311e7acb0..a79758a564 100755 --- a/update_meson.py +++ b/update_meson.py @@ -115,6 +115,9 @@ mod_no_profiles = [ ] +mod_no_tunes = [ +] + regression_modules = [ 'thread_pool', 'thread_support', @@ -230,6 +233,10 @@ %s ] +tune_modules = [ +%s +] + headers_all = [] c_files_all = [] c_files_missing_prototypes = [] @@ -240,6 +247,8 @@ mod_tests = [] mod_profiles = [] profile_exes = [] +mod_tunes = [] +tune_exes = [] # Select the right version of fmpz.c (see configuration) fmpz_link_c_file = files('fmpz/link' / fmpz_c_in) @@ -280,6 +289,7 @@ endforeach mod_profiles += profile_modules +mod_tunes += tune_modules headers_all = files(headers_all) ''' @@ -356,6 +366,28 @@ endforeach ''' +tune_mod_meson_build = '''\ +# This file is generated automatically. +# +# To regenerate it, run: +# python update_meson.py +# + +foreach tune_source : [ +%s +] + tune_stem = fs.stem(tune_source) + tune_exes += executable( + tune_stem, + tune_source, + dependencies: [flint_test_dep], + include_directories: [headers_built_inc], + install: false, + build_by_default: tunes_opt.enabled(), + ) +endforeach +''' + test_mod_NTL_meson_build = '''\ # This file is generated automatically. @@ -575,6 +607,29 @@ def main(args): if profile_c_files: conditional_profile_modules.append(mod + '/profile') + top_tune_dir = join(output_dir, 'src', 'tune') + top_tune_sources = [] + if isdir(top_tune_dir): + top_tune_sources = [ + f for f in listdir(top_tune_dir) + if f.endswith('.c') + ] + tune_modules = [] + if top_tune_sources: + tune_modules.append('tune') + tune_scan_modules = ( + set(modules) - set(non_library_modules) - set(conditional_modules) + ) | set(mod_no_header) + for mod in tune_scan_modules: + tune_dir = join(output_dir, 'src', mod, 'tune') + if mod not in mod_no_tunes and isdir(tune_dir): + tune_c_files = [ + f for f in listdir(tune_dir) + if f.endswith('.c') + ] + if tune_c_files: + tune_modules.append(mod + '/tune') + src_meson_build_text = src_meson_build % ( format_lines(modules_unconditional), format_lines(mod_no_header), @@ -584,6 +639,7 @@ def main(args): format_lines(unroll_modules), format_lines(profile_modules), format_lines(conditional_profile_modules), + format_lines(tune_modules), format_lines(test_only_modules), ) dst_path = join(output_dir, 'src', 'meson.build') @@ -634,6 +690,19 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, profile_mod_meson_build_text) + # src/mod/tune/meson.build + tune_dir = join(mod_dir, 'tune') + if mod not in mod_no_tunes and isdir(tune_dir): + tune_c_files = [f for f in listdir(tune_dir) if f.endswith('.c')] + if tune_c_files: + tune_mod_meson_build_text = tune_mod_meson_build % ( + format_lines(tune_c_files), + ) + dst_path = join(tune_dir, 'meson.build') + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, tune_mod_meson_build_text) + # Build for the NTL tests dst_path = join(output_dir, 'src', 'interfaces', 'test', 'meson.build') test_mod_meson_build_text = test_mod_NTL_meson_build % 'NTL-interface' @@ -663,6 +732,16 @@ def main(args): print('Writing %s' % dst_path) write_file(dst_path, profile_mod_meson_build_text) + # src/tune/meson.build + if top_tune_sources: + tune_mod_meson_build_text = tune_mod_meson_build % ( + format_lines(top_tune_sources), + ) + dst_path = join(top_tune_dir, 'meson.build') + if args.verbose: + print('Writing %s' % dst_path) + write_file(dst_path, tune_mod_meson_build_text) + # src/mpn_extras/*/meson.build for path, asm_submodule in asm_modules: asm_dir = join(output_dir, 'src', path) From 84861499e0ba995811b5a03aea52fe18d56bb034 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 11:21:07 +0200 Subject: [PATCH 093/104] meson: add mpfr_check optino to check MPFR internals --- config/meson.build | 39 +++++++++++++++++++++++++++++++++++++++ meson.options | 2 ++ 2 files changed, 41 insertions(+) diff --git a/config/meson.build b/config/meson.build index a624245c1f..a9e4572921 100644 --- a/config/meson.build +++ b/config/meson.build @@ -18,6 +18,7 @@ abi_opt = get_option('abi') assert_opt = get_option('assert') pretty_tests_opt = get_option('pretty_tests') gmp_internals_opt = get_option('gmp_internals') +mpfr_check_opt = get_option('mpfr_check') assembly_opt = get_option('assembly') avx2_opt = get_option('avx2') avx512_opt = get_option('avx512') @@ -438,6 +439,44 @@ if gmp_internals_opt.allowed() endif +# Match autotools --enable-mpfr-check, which is enabled by default but can be +# disabled for environments where MPFR hides these internal symbols. +if not mpfr_check_opt.disabled() + mpfr_test_code = ''' +#include + +@0@ + +int main(void) { + @1@ + return 0; +} +''' + + mpfr_internal_tests = { + 'mpfr_round_p': [ + 'int mpfr_round_p(mp_srcptr, mp_size_t, mpfr_exp_t, mpfr_prec_t);', + 'mp_limb_t a[1] = { 0 }; return mpfr_round_p(a, (mp_size_t) 1, (mpfr_exp_t) 0, (mpfr_prec_t) 1);', + ], + 'mpfr_mulhigh_n': [ + 'void mpfr_mulhigh_n(mp_ptr, mp_srcptr, mp_srcptr, mp_size_t);', + 'mp_limb_t r[1], a[1] = { 0 }, b[1] = { 0 }; mpfr_mulhigh_n(r, a, b, (mp_size_t) 1);', + ], + 'mpfr_sqrhigh_n': [ + 'void mpfr_sqrhigh_n(mp_ptr, mp_srcptr, mp_size_t);', + 'mp_limb_t r[1], a[1] = { 0 }; mpfr_sqrhigh_n(r, a, (mp_size_t) 1);', + ], + } + + foreach name, snippets : mpfr_internal_tests + _code = mpfr_test_code.format(snippets[0], snippets[1]) + if not cc.links(_code, args: flint_abi_c_args, dependencies: [mpfr_dep, gmp_link_dep], name: name + ' links') + message('This code did not link with -lmpfr: ', _code) + error(name + ' was not found in MPFR. Use -Dmpfr_check=disabled to skip this check.') + endif + endforeach +endif + # ----------------------------------------------------------------------------- # CPU detection # ----------------------------------------------------------------------------- diff --git a/meson.options b/meson.options index 0304d2f1c4..6852228905 100644 --- a/meson.options +++ b/meson.options @@ -22,6 +22,8 @@ option('pretty_tests', type : 'feature', value : 'enabled', description: 'Pretty print test output') option('gmp_internals', type : 'feature', value : 'auto', description: 'Use GMP internals') +option('mpfr_check', type : 'feature', value : 'enabled', + description: 'Check for MPFR internal functions used by FLINT') option('assembly', type : 'feature', value : 'auto', description: 'Use assembly code') option('avx2', type : 'feature', value : 'disabled', From 7b6f59837b53fb8e7d22af4cd7296c385a9de4e6 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 11:26:09 +0200 Subject: [PATCH 094/104] meson: remove libtool_lock option --- config/meson.build | 1 - meson.options | 2 -- 2 files changed, 3 deletions(-) diff --git a/config/meson.build b/config/meson.build index a9e4572921..6e45b88949 100644 --- a/config/meson.build +++ b/config/meson.build @@ -10,7 +10,6 @@ cfg_data = configuration_data() # Project options # ----------------------------------------------------------------------------- -libtool_lock_opt = get_option('libtool_lock') pthread_opt = get_option('pthread') reentrant_opt = get_option('reentrant') thread_safe_opt = get_option('thread_safe') diff --git a/meson.options b/meson.options index 6852228905..e79f27a355 100644 --- a/meson.options +++ b/meson.options @@ -6,8 +6,6 @@ option('profiles', type : 'feature', value : 'disabled', description: 'Configure profile/benchmark programs; enabled also builds them by default') option('tunes', type : 'feature', value : 'disabled', description: 'Configure tune programs; enabled also builds them by default') -option('libtool_lock', type : 'feature', value : 'enabled', - description: 'Use libtool lock') option('pthread', type : 'feature', value : 'enabled', description: 'Use pthread') option('reentrant', type : 'feature', value : 'disabled', From 974b02a9ad6fb3cbae38830cf28e89fa8ecca3cb Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 13:42:04 +0200 Subject: [PATCH 095/104] meson: Add a Makefile wrapper around meson --- .gitignore | 1 - Makefile | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 428c8b0530..6298517296 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,6 @@ config/* config.log confdefs.h conftest.* -/Makefile doc/build doc/latex/flint-manual.* !doc/latex/flint-manual.tex diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..b1cd57677e --- /dev/null +++ b/Makefile @@ -0,0 +1,87 @@ +# Convenience wrapper for the Meson build. +# +# Override BUILD to use a different build directory, for example: +# make check BUILD=build-debug + +BUILD ?= build +MESON ?= $(if $(wildcard .venv/bin/meson),.venv/bin/meson,meson) +MESON_SETUP_ARGS ?= +MESON_COMPILE_ARGS ?= +MESON_TEST_ARGS ?= +GDB ?= gdb +VALGRIND ?= valgrind +VALGRIND_ARGS ?= --track-origins=yes --leak-check=full --show-reachable=yes +DESTDIR ?= + +.PHONY: all setup test tests check debug valgrind examples checkexamples profile tune coverage coverage-html install uninstall clean distclean + +all: setup + $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) + +setup: + @if [ ! -f "$(BUILD)/build.ninja" ]; then \ + $(MESON) setup "$(BUILD)" $(MESON_SETUP_ARGS); \ + fi + +test: check + +tests: + $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS); \ + $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) + +check: setup + $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) + +debug: +ifndef MOD + $(error Use make debug MOD=module ARGS='test arguments') +endif +ifndef ARGS + $(error Use make debug MOD=module ARGS='test arguments') +endif + $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS) + $(MESON) test -C $(BUILD) --gdb --gdb-path $(GDB) --interactive $(MESON_TEST_ARGS) --test-args '$(ARGS)' $(MOD) + +valgrind: + $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS) + $(MESON) test -C $(BUILD) --wrapper '$(VALGRIND) $(VALGRIND_ARGS)' $(MESON_TEST_ARGS) $(MOD) + +examples: + $(MESON) setup "$(BUILD)" --reconfigure -Dexamples=enabled $(MESON_SETUP_ARGS) + $(MESON) compile -C $(BUILD) examples $(MESON_COMPILE_ARGS) + +checkexamples: + $(MESON) setup "$(BUILD)" --reconfigure -Dexamples=enabled $(MESON_SETUP_ARGS) + $(MESON) test -C $(BUILD) --suite examples $(MESON_TEST_ARGS) + +profile: + $(MESON) setup "$(BUILD)" --reconfigure -Dprofiles=enabled $(MESON_SETUP_ARGS) + $(MESON) compile -C $(BUILD) profile $(MESON_COMPILE_ARGS) + +tune: + $(MESON) setup "$(BUILD)" --reconfigure -Dtunes=enabled $(MESON_SETUP_ARGS) + $(MESON) compile -C $(BUILD) tune $(MESON_COMPILE_ARGS) + +coverage: + $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled -Db_coverage=true $(MESON_SETUP_ARGS); \ + $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) + $(MESON) coverage -C $(BUILD) + +coverage-html: + $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled -Db_coverage=true $(MESON_SETUP_ARGS); \ + $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) + $(MESON) coverage -C $(BUILD) --html + +install: setup + $(MESON) install -C $(BUILD) $(if $(DESTDIR),--destdir $(DESTDIR),) + +uninstall: + $(MESON) compile -C $(BUILD) uninstall + +clean: + @if [ -f "$(BUILD)/build.ninja" ]; then \ + $(MESON) compile -C $(BUILD) --clean; \ + fi + +distclean: + rm -rf "$(BUILD)" From 1218cecdb024a83e184f94d7a8e49fe16a6b4b56 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 14:10:28 +0200 Subject: [PATCH 096/104] Don't use feature flags for build targets --- .github/workflows/CI.yml | 22 ++++++++++---------- Makefile | 27 ++++++++++--------------- meson.build | 43 +++++++++++++++------------------------- meson.options | 8 -------- update_meson.py | 13 +++++++----- 5 files changed, 45 insertions(+), 68 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1c21f8cf52..14428785cf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -63,7 +63,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled + run: meson setup build - name: "Compile" run: meson compile -C build - name: "Check" @@ -92,7 +92,7 @@ jobs: run: python3 update_meson.py - name: "Build FLINT for msolve" run: | - meson setup build -Dtests=enabled -Dntl=enabled -Dassert=enabled + meson setup build -Dntl=enabled -Dassert=enabled meson compile -C build sudo meson install -C build sudo ldconfig @@ -109,7 +109,7 @@ jobs: gmp_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(gmp_artifact_dir())') mpfr_path=$(julia -e 'include("dev/find_gmp_mpfr.jl"); print(mpfr_artifact_dir())') echo "Path to GMP and MPFR: ${gmp_path}, ${mpfr_path}" - PKG_CONFIG_PATH="${gmp_path}/lib/pkgconfig:${mpfr_path}/lib/pkgconfig" meson setup build-nemo --prefix="$(pwd)/nemo-flint" -Dlibdir=lib -Dtests=disabled + PKG_CONFIG_PATH="${gmp_path}/lib/pkgconfig:${mpfr_path}/lib/pkgconfig" meson setup build-nemo --prefix="$(pwd)/nemo-flint" -Dlibdir=lib meson compile -C build-nemo meson install -C build-nemo - name: "Test Nemo.jl" @@ -141,7 +141,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled -Davx2=enabled -Db_coverage=true + run: meson setup build -Davx2=enabled -Db_coverage=true - name: "Compile" run: meson compile -C build && ldd build/libflint.so - name: "Check" @@ -173,7 +173,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=disabled + run: meson setup build - name: "Check regression in a subset of modules" run: meson compile -C build regression-check @@ -196,7 +196,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled + run: meson setup build - name: "Compile" run: meson compile -C build - name: "Check" @@ -222,7 +222,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled + run: meson setup build - name: "Compile" run: meson compile -C build - name: "Check" @@ -247,7 +247,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled -Dexamples=enabled -Dblas=enabled -Db_sanitize=address -Db_lundef=false + run: meson setup build -Dblas=enabled -Db_sanitize=address -Db_lundef=false - name: "Compile" run: meson compile -C build - name: "Check" @@ -283,7 +283,7 @@ jobs: - name: "Generate Meson files" run: python update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled + run: meson setup build - name: "Compile" run: meson compile -C build - name: "Check" @@ -337,7 +337,7 @@ jobs: - name: "Generate Meson files" run: python update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled + run: meson setup build - name: "Compile" run: meson compile -C build - name: "Check" @@ -371,7 +371,7 @@ jobs: - name: "Generate Meson files" run: python3 update_meson.py - name: "Configure" - run: meson setup build -Dtests=enabled -Dassert=enabled + run: meson setup build -Dassert=enabled - name: "Compile" run: meson compile -C build - name: "Check" diff --git a/Makefile b/Makefile index b1cd57677e..6a88be2f1a 100644 --- a/Makefile +++ b/Makefile @@ -25,50 +25,43 @@ setup: test: check -tests: - $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS); \ - $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) +tests: setup + $(MESON) compile -C $(BUILD) tests $(MESON_COMPILE_ARGS) check: setup $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) -debug: +debug: setup ifndef MOD $(error Use make debug MOD=module ARGS='test arguments') endif ifndef ARGS $(error Use make debug MOD=module ARGS='test arguments') endif - $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS) $(MESON) test -C $(BUILD) --gdb --gdb-path $(GDB) --interactive $(MESON_TEST_ARGS) --test-args '$(ARGS)' $(MOD) -valgrind: - $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled $(MESON_SETUP_ARGS) +valgrind: setup $(MESON) test -C $(BUILD) --wrapper '$(VALGRIND) $(VALGRIND_ARGS)' $(MESON_TEST_ARGS) $(MOD) -examples: - $(MESON) setup "$(BUILD)" --reconfigure -Dexamples=enabled $(MESON_SETUP_ARGS) +examples: setup $(MESON) compile -C $(BUILD) examples $(MESON_COMPILE_ARGS) -checkexamples: - $(MESON) setup "$(BUILD)" --reconfigure -Dexamples=enabled $(MESON_SETUP_ARGS) +checkexamples: setup $(MESON) test -C $(BUILD) --suite examples $(MESON_TEST_ARGS) -profile: - $(MESON) setup "$(BUILD)" --reconfigure -Dprofiles=enabled $(MESON_SETUP_ARGS) +profile: setup $(MESON) compile -C $(BUILD) profile $(MESON_COMPILE_ARGS) -tune: - $(MESON) setup "$(BUILD)" --reconfigure -Dtunes=enabled $(MESON_SETUP_ARGS) +tune: setup $(MESON) compile -C $(BUILD) tune $(MESON_COMPILE_ARGS) coverage: - $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled -Db_coverage=true $(MESON_SETUP_ARGS); \ + $(MESON) setup "$(BUILD)" --reconfigure -Db_coverage=true $(MESON_SETUP_ARGS); \ $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) $(MESON) coverage -C $(BUILD) coverage-html: - $(MESON) setup "$(BUILD)" --reconfigure -Dtests=enabled -Db_coverage=true $(MESON_SETUP_ARGS); \ + $(MESON) setup "$(BUILD)" --reconfigure -Db_coverage=true $(MESON_SETUP_ARGS); \ $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) $(MESON) coverage -C $(BUILD) --html diff --git a/meson.build b/meson.build index c9508d2feb..b221a0f044 100644 --- a/meson.build +++ b/meson.build @@ -236,33 +236,22 @@ flint_test_dep = declare_dependency( compile_args: flint_cpu_c_args, ) -examples_opt = get_option('examples') -if not examples_opt.disabled() - subdir('examples') -endif - -profiles_opt = get_option('profiles') -if not profiles_opt.disabled() - foreach mod_profile : mod_profiles - subdir('src' / mod_profile) - endforeach - alias_target('profile', profile_exes) -endif - -tunes_opt = get_option('tunes') -if not tunes_opt.disabled() - foreach mod_tune : mod_tunes - subdir('src' / mod_tune) - endforeach - alias_target('tune', tune_exes) -endif - -tests_opt = get_option('tests') -if not tests_opt.disabled() - foreach mod_test : mod_tests - subdir('src' / mod_test) - endforeach -endif +subdir('examples') + +foreach mod_profile : mod_profiles + subdir('src' / mod_profile) +endforeach +alias_target('profile', profile_exes) + +foreach mod_tune : mod_tunes + subdir('src' / mod_tune) +endforeach +alias_target('tune', tune_exes) + +foreach mod_test : mod_tests + subdir('src' / mod_test) +endforeach +alias_target('tests', test_exes) pkg_mod = import('pkgconfig') pkg_mod.generate( diff --git a/meson.options b/meson.options index e79f27a355..0291a8c370 100644 --- a/meson.options +++ b/meson.options @@ -1,11 +1,3 @@ -option('tests', type : 'feature', value : 'auto', - description: 'Configure tests; enabled also builds them by default') -option('examples', type : 'feature', value : 'disabled', - description: 'Configure example programs; enabled also builds and tests them by default') -option('profiles', type : 'feature', value : 'disabled', - description: 'Configure profile/benchmark programs; enabled also builds them by default') -option('tunes', type : 'feature', value : 'disabled', - description: 'Configure tune programs; enabled also builds them by default') option('pthread', type : 'feature', value : 'enabled', description: 'Use pthread') option('reentrant', type : 'feature', value : 'disabled', diff --git a/update_meson.py b/update_meson.py index a79758a564..97c81a0b7d 100755 --- a/update_meson.py +++ b/update_meson.py @@ -245,6 +245,7 @@ c_files_no_missing_prototypes_unroll = [] regression_c_files = [] mod_tests = [] +test_exes = [] mod_profiles = [] profile_exes = [] mod_tunes = [] @@ -338,8 +339,9 @@ 'main.c', dependencies: [flint_test_dep], install: false, - build_by_default: tests_opt.enabled(), + build_by_default: false, ) +test_exes += test_exe test('%s', test_exe, timeout: 0) ''' @@ -361,7 +363,7 @@ dependencies: [flint_test_dep], include_directories: [headers_built_inc], install: false, - build_by_default: profiles_opt.enabled(), + build_by_default: false, ) endforeach ''' @@ -383,7 +385,7 @@ dependencies: [flint_test_dep], include_directories: [headers_built_inc], install: false, - build_by_default: tunes_opt.enabled(), + build_by_default: false, ) endforeach ''' @@ -400,8 +402,9 @@ 't-NTL-interface.cpp', dependencies: [flint_test_dep, ntl_dep], install: false, - build_by_default: tests_opt.enabled(), + build_by_default: false, ) +test_exes += test_exe test('%s', test_exe, timeout: 0) ''' @@ -427,7 +430,7 @@ dependencies: [flint_test_dep], include_directories: [headers_built_inc], install: false, - build_by_default: examples_opt.enabled(), + build_by_default: false, ) example_exes += example_exe From aa2b1c7bc93216a9512f013a4a84b725eb33ca09 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 14:40:06 +0200 Subject: [PATCH 097/104] meson: don't include examples as tests --- .github/workflows/CI.yml | 10 ++++++++++ Makefile | 6 +++++- update_meson.py | 19 ++++--------------- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14428785cf..95d91f4fac 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -255,6 +255,16 @@ jobs: ASAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1 UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 run: echo "FLINT_TEST_MULTIPLIER = $FLINT_TEST_MULTIPLIER" && meson test -C build --print-errorlogs + - name: "Check examples" + env: + ASAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1 + UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 + run: | + meson compile -C build examples + for src in examples/*.c; do + example=$(basename "$src" .c) + ./dev/check_examples.sh "$example" build/examples + done mingw64-gcc: name: Meson, MinGW (x0.5) diff --git a/Makefile b/Makefile index 6a88be2f1a..1710f1a21a 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,11 @@ examples: setup $(MESON) compile -C $(BUILD) examples $(MESON_COMPILE_ARGS) checkexamples: setup - $(MESON) test -C $(BUILD) --suite examples $(MESON_TEST_ARGS) + $(MESON) compile -C $(BUILD) examples $(MESON_COMPILE_ARGS) + @for src in examples/*.c; do \ + example=$$(basename "$$src" .c); \ + ./dev/check_examples.sh "$$example" "$(BUILD)/examples"; \ + done profile: setup $(MESON) compile -C $(BUILD) profile $(MESON_COMPILE_ARGS) diff --git a/update_meson.py b/update_meson.py index 97c81a0b7d..d6302c8eb0 100755 --- a/update_meson.py +++ b/update_meson.py @@ -417,13 +417,12 @@ # python update_meson.py # -check_examples = find_program('../dev/check_examples.sh') - -example_exes = [] - -foreach example : [ +examples = [ %s ] +example_exes = [] + +foreach example : examples example_exe = executable( example, example + '.c', @@ -434,16 +433,6 @@ ) example_exes += example_exe - - test( - 'example_' + example, - check_examples, - args: [example, meson.current_build_dir()], - depends: example_exe, - suite: 'examples', - timeout: 0, - workdir: meson.project_source_root(), - ) endforeach alias_target('examples', example_exes) From df50b15cb2778215efe314f17a0b9a592f324f8d Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 16:08:06 +0200 Subject: [PATCH 098/104] meson: link each module into a static library --- meson.build | 30 ++++++++++++++++++++---------- update_meson.py | 13 +++++++++++++ 2 files changed, 33 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index b221a0f044..8de72d4544 100644 --- a/meson.build +++ b/meson.build @@ -73,8 +73,8 @@ endif c_files_static_all = c_files_all + s_files_static c_files_shared_all = c_files_all + s_files_shared -c_files_static = c_files_missing_prototypes + s_files_static -c_files_shared = c_files_missing_prototypes + s_files_shared +c_files_static = s_files_static +c_files_shared = s_files_shared # Build include directory after list of all source files is complete subdir('include') @@ -90,23 +90,33 @@ libflint_static_link_whole = [] if cc.get_argument_syntax() != 'msvc' foreach bucket : [ + ['missing_prototypes', + c_file_buckets_missing_prototypes, + libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args], ['no_missing_prototypes', - c_files_no_missing_prototypes, + c_file_buckets_no_missing_prototypes, libflint_c_args + flint_cpu_c_args], ['unroll', - c_files_missing_prototypes_unroll, + c_file_buckets_missing_prototypes_unroll, libflint_c_args + flint_cpu_c_args + flint_library_warning_c_args + flint_unroll_loops_c_args], ['no_missing_prototypes_unroll', - c_files_no_missing_prototypes_unroll, + c_file_buckets_no_missing_prototypes_unroll, libflint_c_args + flint_cpu_c_args + flint_unroll_loops_c_args], ] bucket_name = bucket[0] - bucket_sources = bucket[1] + bucket_source_groups = bucket[1] bucket_c_args = bucket[2] - if bucket_sources.length() > 0 + foreach bucket_source_group : bucket_source_groups + bucket_source_name = bucket_source_group[0] + bucket_sources = bucket_source_group[1] + + if bucket_sources.length() == 0 + continue + endif + if build_shared_library - libflint_shared_link_whole += [static_library('flint_' + bucket_name + '_shared', + libflint_shared_link_whole += [static_library('flint_' + bucket_name + '_' + bucket_source_name + '_shared', bucket_sources + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], @@ -117,7 +127,7 @@ if cc.get_argument_syntax() != 'msvc' endif if build_static_library - libflint_static_link_whole += [static_library('flint_' + bucket_name + '_static', + libflint_static_link_whole += [static_library('flint_' + bucket_name + '_' + bucket_source_name + '_static', bucket_sources + headers_all, dependencies: flint_deps, include_directories: [headers_built_nodir_inc, 'src'], @@ -126,7 +136,7 @@ if cc.get_argument_syntax() != 'msvc' c_args: bucket_c_args, )] endif - endif + endforeach endforeach endif diff --git a/update_meson.py b/update_meson.py index d6302c8eb0..65905e14d2 100755 --- a/update_meson.py +++ b/update_meson.py @@ -243,6 +243,10 @@ c_files_missing_prototypes_unroll = [] c_files_no_missing_prototypes = [] c_files_no_missing_prototypes_unroll = [] +c_file_buckets_missing_prototypes = [] +c_file_buckets_missing_prototypes_unroll = [] +c_file_buckets_no_missing_prototypes = [] +c_file_buckets_no_missing_prototypes_unroll = [] regression_c_files = [] mod_tests = [] test_exes = [] @@ -255,6 +259,7 @@ fmpz_link_c_file = files('fmpz/link' / fmpz_c_in) c_files_all += fmpz_link_c_file c_files_missing_prototypes += fmpz_link_c_file +c_file_buckets_missing_prototypes += [['fmpz_link', fmpz_link_c_file]] regression_c_files += fmpz_link_c_file foreach mod : modules @@ -317,9 +322,13 @@ if '%s' in unroll_modules c_files_missing_prototypes_unroll += module_c_files c_files_no_missing_prototypes_unroll += module_c_files_no_missing_prototypes + c_file_buckets_missing_prototypes_unroll += [['%s', module_c_files]] + c_file_buckets_no_missing_prototypes_unroll += [['%s', module_c_files_no_missing_prototypes]] else c_files_missing_prototypes += module_c_files c_files_no_missing_prototypes += module_c_files_no_missing_prototypes + c_file_buckets_missing_prototypes += [['%s', module_c_files]] + c_file_buckets_no_missing_prototypes += [['%s', module_c_files_no_missing_prototypes]] endif if '%s' in regression_modules @@ -654,6 +663,10 @@ def main(args): format_lines(c_files_no_missing_prototypes), mod, mod, + mod, + mod, + mod, + mod, ) dst_path = join(mod_dir, 'meson.build') if args.verbose: From 6ee36b54354c9b8e54aacb52fd937b6637f36638 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 17:33:02 +0200 Subject: [PATCH 099/104] meson: don't add -lgmp multipple times --- meson.build | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 8de72d4544..420d460e23 100644 --- a/meson.build +++ b/meson.build @@ -50,6 +50,15 @@ if have_gc flint_deps += gc_dep endif +flint_compile_deps = [] +foreach dep : flint_deps + flint_compile_deps += dep.partial_dependency( + compile_args: true, + includes: true, + sources: true, + ) +endforeach + add_project_arguments(flint_abi_c_args, language: 'c') add_project_link_arguments(flint_abi_c_args, language: 'c') @@ -118,7 +127,7 @@ if cc.get_argument_syntax() != 'msvc' if build_shared_library libflint_shared_link_whole += [static_library('flint_' + bucket_name + '_' + bucket_source_name + '_shared', bucket_sources + headers_all, - dependencies: flint_deps, + dependencies: flint_compile_deps, include_directories: [headers_built_nodir_inc, 'src'], install: false, pic: true, @@ -129,7 +138,7 @@ if cc.get_argument_syntax() != 'msvc' if build_static_library libflint_static_link_whole += [static_library('flint_' + bucket_name + '_' + bucket_source_name + '_static', bucket_sources + headers_all, - dependencies: flint_deps, + dependencies: flint_compile_deps, include_directories: [headers_built_nodir_inc, 'src'], install: false, pic: false, From 24090da062cb8e4fd1bfadb967841fd50c011fc7 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Fri, 19 Jun 2026 22:09:09 +0200 Subject: [PATCH 100/104] meson: add all missing make rules to match autotools --- Makefile | 80 ++++++++++++++++++++++++++++++++++++++++++++++--- update_meson.py | 10 ++++++- 2 files changed, 85 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 1710f1a21a..df6d51a199 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,43 @@ VALGRIND ?= valgrind VALGRIND_ARGS ?= --track-origins=yes --leak-check=full --show-reachable=yes DESTDIR ?= -.PHONY: all setup test tests check debug valgrind examples checkexamples profile tune coverage coverage-html install uninstall clean distclean +.PHONY: all setup library shared static test tests check debug valgrind examples checkexamples profile tune coverage coverage_html install uninstall clean distclean print-% + +ifneq ($(NJOBS),) +number_generator = $(words $2) $(if $(word $1,$2),,$(call number_generator,$1,w $2)) +THREAD_LIST := $(call number_generator,$(NJOBS),w) +CHECK_THREAD_TARGETS := $(foreach mod,$(MOD),$(foreach num,$(THREAD_LIST),check-$(mod)-thread-$(num))) + +define check_mod_build_rule +.PHONY: check-$(1)-build +check-$(1)-build: setup + $$(MESON) compile -C $$(BUILD) src/$(1)/test/main $$(MESON_COMPILE_ARGS) +endef + +define check_thread_rule +.PHONY: check-$(1)-thread-$(2) +check-$(1)-thread-$(2): check-$(1)-build + @exe="$$(BUILD)/src/$(1)/test/main"; \ + if [ ! -f "$$$$exe" ]; then exe="$$$$exe.exe"; fi; \ + echo "$$$$exe --numthreads=$$(NJOBS) --thread=$(2)"; \ + LD_LIBRARY_PATH="$$(BUILD):$$$$LD_LIBRARY_PATH" DYLD_LIBRARY_PATH="$$(BUILD):$$$$DYLD_LIBRARY_PATH" "$$$$exe" --numthreads=$$(NJOBS) --thread=$(2) +endef + +$(foreach mod,$(MOD),$(eval $(call check_mod_build_rule,$(mod)))) +$(foreach mod,$(MOD),$(foreach num,$(THREAD_LIST),$(eval $(call check_thread_rule,$(mod),$(num))))) +endif + +all: library + +library: setup + $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) + +shared: + $(MESON) setup "$(BUILD)" --reconfigure -Ddefault_library=shared $(MESON_SETUP_ARGS) + $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) -all: setup +static: + $(MESON) setup "$(BUILD)" --reconfigure -Ddefault_library=static $(MESON_SETUP_ARGS) $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) setup: @@ -29,7 +63,38 @@ tests: setup $(MESON) compile -C $(BUILD) tests $(MESON_COMPILE_ARGS) check: setup +ifneq ($(NJOBS),) +ifdef MOD +ifndef ARGS +check: $(CHECK_THREAD_TARGETS) +endif +endif +endif + +ifdef PYTHON + $(MESON) compile -C $(BUILD) $(MESON_COMPILE_ARGS) + @LD_LIBRARY_PATH="$(BUILD):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(BUILD):$${DYLD_LIBRARY_PATH}" python3 src/python/flint_ctypes.py + @echo '' + @echo 'All Python tests passed.' +else +ifdef ARGS +ifneq ($(words $(sort $(MOD))),1) + $(error Can only check one module with arguments) +endif + $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) --test-args='$(ARGS)' $(MOD) +else +ifdef NJOBS +ifdef MOD + @echo '' + @echo 'All tests passed for $(sort $(MOD)).' +else + $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) +endif +else $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) +endif +endif +endif debug: setup ifndef MOD @@ -38,7 +103,7 @@ endif ifndef ARGS $(error Use make debug MOD=module ARGS='test arguments') endif - $(MESON) test -C $(BUILD) --gdb --gdb-path $(GDB) --interactive $(MESON_TEST_ARGS) --test-args '$(ARGS)' $(MOD) + $(MESON) test -C $(BUILD) --gdb --gdb-path $(GDB) --interactive $(MESON_TEST_ARGS) --test-args='$(ARGS)' $(MOD) valgrind: setup $(MESON) test -C $(BUILD) --wrapper '$(VALGRIND) $(VALGRIND_ARGS)' $(MESON_TEST_ARGS) $(MOD) @@ -54,7 +119,11 @@ checkexamples: setup done profile: setup +ifdef MOD + $(MESON) compile -C $(BUILD) $(MOD)-profile $(MESON_COMPILE_ARGS) +else $(MESON) compile -C $(BUILD) profile $(MESON_COMPILE_ARGS) +endif tune: setup $(MESON) compile -C $(BUILD) tune $(MESON_COMPILE_ARGS) @@ -64,7 +133,7 @@ coverage: $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) $(MESON) coverage -C $(BUILD) -coverage-html: +coverage_html: $(MESON) setup "$(BUILD)" --reconfigure -Db_coverage=true $(MESON_SETUP_ARGS); \ $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) $(MESON) coverage -C $(BUILD) --html @@ -82,3 +151,6 @@ clean: distclean: rm -rf "$(BUILD)" + +print-%: + @echo "$*=$($*)" diff --git a/update_meson.py b/update_meson.py index 65905e14d2..b4ccb89b97 100755 --- a/update_meson.py +++ b/update_meson.py @@ -362,11 +362,13 @@ # python update_meson.py # +mod_profile_exes = [] + foreach profile_source : [ %s ] profile_stem = fs.stem(profile_source) - profile_exes += executable( + profile_exe = executable( profile_stem, profile_source, dependencies: [flint_test_dep], @@ -374,7 +376,11 @@ install: false, build_by_default: false, ) + profile_exes += profile_exe + mod_profile_exes += profile_exe endforeach + +alias_target('%s-profile', mod_profile_exes) ''' tune_mod_meson_build = '''\ @@ -689,6 +695,7 @@ def main(args): if profile_c_files: profile_mod_meson_build_text = profile_mod_meson_build % ( format_lines(profile_c_files), + mod, ) dst_path = join(profile_dir, 'meson.build') if args.verbose: @@ -731,6 +738,7 @@ def main(args): if top_profile_sources: profile_mod_meson_build_text = profile_mod_meson_build % ( format_lines(top_profile_sources), + 'profile', ) dst_path = join(top_profile_dir, 'meson.build') if args.verbose: From a4556f798910d3f19ce6b8cd95f22c3796d76028 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Jun 2026 11:32:45 +0200 Subject: [PATCH 101/104] meson: add make bench to run benchmarks --- Makefile | 6 +++++- dev/create_build_links.py | 37 +++++++++++++++++++++++++++++++++++++ meson.build | 7 +++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 dev/create_build_links.py diff --git a/Makefile b/Makefile index df6d51a199..c816254200 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ VALGRIND ?= valgrind VALGRIND_ARGS ?= --track-origins=yes --leak-check=full --show-reachable=yes DESTDIR ?= -.PHONY: all setup library shared static test tests check debug valgrind examples checkexamples profile tune coverage coverage_html install uninstall clean distclean print-% +.PHONY: all setup library shared static test tests check debug valgrind examples checkexamples profile tune bench coverage coverage_html install uninstall clean distclean print-% ifneq ($(NJOBS),) number_generator = $(words $2) $(if $(word $1,$2),,$(call number_generator,$1,w $2)) @@ -128,6 +128,10 @@ endif tune: setup $(MESON) compile -C $(BUILD) tune $(MESON_COMPILE_ARGS) +bench: setup + $(MESON) compile -C $(BUILD) examples fmpz-profile fmpz_factor-profile fmpz_poly_factor-profile fmpz_mpoly_factor-profile nmod_mpoly_factor-profile $(MESON_COMPILE_ARGS) + @LD_LIBRARY_PATH="$(BUILD):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(BUILD):$${DYLD_LIBRARY_PATH}" python3 dev/bench.py + coverage: $(MESON) setup "$(BUILD)" --reconfigure -Db_coverage=true $(MESON_SETUP_ARGS); \ $(MESON) test -C $(BUILD) $(MESON_TEST_ARGS) $(MOD) diff --git a/dev/create_build_links.py b/dev/create_build_links.py new file mode 100644 index 0000000000..32c0051f9e --- /dev/null +++ b/dev/create_build_links.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python3 +import os +import sys + + +def main(argv): + if len(argv) != 2: + print("usage: create_build_links.py BUILDDIR", file=sys.stderr) + return 2 + + build_dir = os.path.abspath(argv[1]) + src_build_dir = os.path.join(build_dir, "src") + + if not os.path.isdir(src_build_dir): + return 0 + + for name in os.listdir(src_build_dir): + src = os.path.join(src_build_dir, name) + dst = os.path.join(build_dir, name) + + if not os.path.isdir(src) or os.path.exists(dst) or os.path.islink(dst): + continue + + rel_src = os.path.relpath(src, os.path.dirname(dst)) + try: + os.symlink(rel_src, dst, target_is_directory=True) + except OSError: + # Symlinks may be unavailable on some platforms. The canonical Meson + # paths under build/src still work, so this compatibility layer is + # best-effort. + pass + + return 0 + + +if __name__ == "__main__": + sys.exit(main(sys.argv)) diff --git a/meson.build b/meson.build index 420d460e23..4895e5bea9 100644 --- a/meson.build +++ b/meson.build @@ -19,6 +19,7 @@ FLINT_LIBRARY_VERSION = '.'.join([FLINT_MAJOR_SO, FLINT_MINOR_SO, FLINT_PATCH_SO cc = meson.get_compiler('c') fs = import('fs') +python3 = find_program('python3') default_library_opt = get_option('default_library') build_shared_library = default_library_opt in ['shared', 'both'] build_static_library = default_library_opt in ['static', 'both'] @@ -64,6 +65,12 @@ add_project_link_arguments(flint_abi_c_args, language: 'c') subdir('src') +meson.add_postconf_script( + python3, + files('dev/create_build_links.py'), + meson.project_build_root(), +) + if have_assembly # Generate config.m4 with assembly language configuration config_m4 = configure_file( From 8cd1ea3e582eb58bda7e9d016d302b3e49ef150b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Jun 2026 12:42:59 +0200 Subject: [PATCH 102/104] meson: add dev/gcc to build ad-hoc executables --- dev/gcc | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100755 dev/gcc diff --git a/dev/gcc b/dev/gcc new file mode 100755 index 0000000000..e26a67a222 --- /dev/null +++ b/dev/gcc @@ -0,0 +1,134 @@ +#!/usr/bin/env python3 +import json +import os +import shutil +import subprocess +import sys +import configparser + + +HELP = """\ +usage: dev/gcc [-C builddir] SOURCE.c [compiler arguments...] + +Compile an ad-hoc C program against the FLINT development build. + +Common examples: + dev/gcc bug.c -o bug + dev/gcc -C build-debug bug.c -o bug -O0 -g + BUILD=build-debug dev/gcc bug.c -o bug + +The script builds libflint first, uses the C compiler configured by Meson, +adds the in-tree FLINT include/library paths, and uses pkg-config for FLINT, +GMP, and MPFR. It reuses the pkg-config path saved in the Meson build +directory; set PKG_CONFIG_PATH only to add extra pkg-config search paths. +""" + + +def pop_builddir(args): + builddir = os.environ.get("BUILD", "build") + out = [] + it = iter(args) + for arg in it: + if arg == "-C": + builddir = next(it, None) + if builddir is None: + raise SystemExit("error: -C needs a build directory") + elif arg.startswith("--builddir="): + builddir = arg.split("=", 1)[1] + else: + out.append(arg) + return builddir, out + + +def run_stdout(cmd, env=None): + return subprocess.check_output(cmd, env=env, text=True).strip() + + +def shell_words(text): + # pkg-config output is shell-like. Keep this helper local so callers do not + # need a shell for the final compiler invocation. + import shlex + return shlex.split(text) + + +def dedup(args): + seen = set() + out = [] + for arg in args: + if arg in seen: + continue + seen.add(arg) + out.append(arg) + return out + + +def configured_pkg_config_path(builddir): + cmd_line = os.path.join(builddir, "meson-private", "cmd_line.txt") + if not os.path.exists(cmd_line): + return [] + + parser = configparser.ConfigParser(interpolation=None) + parser.read(cmd_line) + if not parser.has_option("options", "pkg_config_path"): + return [] + + value = parser.get("options", "pkg_config_path").strip() + if not value: + return [] + + return [path for path in value.split(os.pathsep) if path] + + +def main(argv): + if argv and argv[0] in ["-h", "--help"]: + print(HELP, end="") + return 0 + + builddir, compiler_args = pop_builddir(argv) + if not compiler_args: + print(HELP, end="", file=sys.stderr) + return 2 + + builddir = os.path.abspath(builddir) + source_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) + meson = os.path.join(source_dir, ".venv", "bin", "meson") + if not os.path.exists(meson): + meson = shutil.which("meson") or "meson" + + subprocess.check_call([meson, "compile", "-C", builddir]) + + compilers = json.loads(run_stdout([meson, "introspect", builddir, "--compilers"])) + c_compiler = compilers["host"]["c"]["exelist"] + + env = os.environ.copy() + uninstalled_pc_dir = os.path.join(builddir, "meson-uninstalled") + pkg_config_paths = [uninstalled_pc_dir] + pkg_config_paths += configured_pkg_config_path(builddir) + if env.get("PKG_CONFIG_PATH"): + pkg_config_paths += env["PKG_CONFIG_PATH"].split(os.pathsep) + env["PKG_CONFIG_PATH"] = os.pathsep.join(dedup(pkg_config_paths)) + + pkg_config = env.get("PKG_CONFIG") or shutil.which("pkg-config") or "pkg-config" + flint_pkg = "flint-uninstalled" + if subprocess.call([pkg_config, "--exists", flint_pkg], env=env) != 0: + flint_pkg = "flint" + + cflags = [ + "-I" + os.path.join(builddir, "include"), + "-I" + os.path.join(source_dir, "include"), + ] + cflags += shell_words(run_stdout([pkg_config, "--cflags", flint_pkg, "gmp", "mpfr"], env=env)) + cflags = dedup(cflags) + libs = dedup(shell_words(run_stdout([pkg_config, "--libs", flint_pkg, "gmp", "mpfr"], env=env))) + + rpath_args = [] + if os.name != "nt": + rpath_args = ["-Wl,-rpath," + builddir] + + cmd = c_compiler + cflags + compiler_args + libs + rpath_args + print(" ".join(cmd)) + return subprocess.call(cmd, env=env) + + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) From d6172f349d2bc2f8eb58e6516369bd5fb4151d48 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Jun 2026 13:40:12 +0200 Subject: [PATCH 103/104] meson: create build links after meson and set -g --- Makefile | 4 +++ dev/create_build_links.py | 57 ++++++++++++++++++++++++++++++--------- meson.build | 7 +---- 3 files changed, 50 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index c816254200..ce03d7a754 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ test: check tests: setup $(MESON) compile -C $(BUILD) tests $(MESON_COMPILE_ARGS) + @python3 dev/create_build_links.py "$(BUILD)" check: setup ifneq ($(NJOBS),) @@ -124,12 +125,15 @@ ifdef MOD else $(MESON) compile -C $(BUILD) profile $(MESON_COMPILE_ARGS) endif + @python3 dev/create_build_links.py "$(BUILD)" tune: setup $(MESON) compile -C $(BUILD) tune $(MESON_COMPILE_ARGS) + @python3 dev/create_build_links.py "$(BUILD)" bench: setup $(MESON) compile -C $(BUILD) examples fmpz-profile fmpz_factor-profile fmpz_poly_factor-profile fmpz_mpoly_factor-profile nmod_mpoly_factor-profile $(MESON_COMPILE_ARGS) + @python3 dev/create_build_links.py "$(BUILD)" @LD_LIBRARY_PATH="$(BUILD):$${LD_LIBRARY_PATH}" DYLD_LIBRARY_PATH="$(BUILD):$${DYLD_LIBRARY_PATH}" python3 dev/bench.py coverage: diff --git a/dev/create_build_links.py b/dev/create_build_links.py index 32c0051f9e..ed3ae23dd8 100644 --- a/dev/create_build_links.py +++ b/dev/create_build_links.py @@ -1,8 +1,41 @@ #!/usr/bin/env python3 import os +import shutil +import stat import sys +EXEC_DIRS = {"profile", "test", "tune"} +SKIP_SUFFIXES = {".o", ".obj", ".d", ".pdb", ".ilk", ".rsp"} + + +def is_executable_file(path): + if not os.path.isfile(path): + return False + name = os.path.basename(path) + if name.endswith(".exe"): + return True + if os.path.splitext(name)[1] in SKIP_SUFFIXES: + return False + mode = os.stat(path).st_mode + return bool(mode & (stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) + + +def link_or_copy(src, dst): + os.makedirs(os.path.dirname(dst), exist_ok=True) + + if os.path.lexists(dst): + if os.path.isdir(dst) and not os.path.islink(dst): + return + os.unlink(dst) + + rel_src = os.path.relpath(src, os.path.dirname(dst)) + try: + os.symlink(rel_src, dst) + except OSError: + shutil.copy2(src, dst) + + def main(argv): if len(argv) != 2: print("usage: create_build_links.py BUILDDIR", file=sys.stderr) @@ -14,21 +47,21 @@ def main(argv): if not os.path.isdir(src_build_dir): return 0 - for name in os.listdir(src_build_dir): - src = os.path.join(src_build_dir, name) - dst = os.path.join(build_dir, name) + for root, dirs, files in os.walk(src_build_dir): + dirs[:] = [d for d in dirs if not d.endswith(".p")] + rel_root = os.path.relpath(root, src_build_dir) + parts = rel_root.split(os.sep) - if not os.path.isdir(src) or os.path.exists(dst) or os.path.islink(dst): + if not any(part in EXEC_DIRS for part in parts): continue - rel_src = os.path.relpath(src, os.path.dirname(dst)) - try: - os.symlink(rel_src, dst, target_is_directory=True) - except OSError: - # Symlinks may be unavailable on some platforms. The canonical Meson - # paths under build/src still work, so this compatibility layer is - # best-effort. - pass + for name in files: + src = os.path.join(root, name) + if not is_executable_file(src): + continue + + dst = os.path.join(build_dir, rel_root, name) + link_or_copy(src, dst) return 0 diff --git a/meson.build b/meson.build index 4895e5bea9..1fec9c5bbf 100644 --- a/meson.build +++ b/meson.build @@ -5,6 +5,7 @@ project('FLINT', 'c', default_options: [ 'buildtype=release', 'c_std=c11', + 'debug=true', ], ) @@ -65,12 +66,6 @@ add_project_link_arguments(flint_abi_c_args, language: 'c') subdir('src') -meson.add_postconf_script( - python3, - files('dev/create_build_links.py'), - meson.project_build_root(), -) - if have_assembly # Generate config.m4 with assembly language configuration config_m4 = configure_file( From 9105ebdb0c5c763f05f77577b4cb01cbda9f6dd2 Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Sat, 20 Jun 2026 13:53:42 +0200 Subject: [PATCH 104/104] meson: set debaug=false for regression check target --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 1fec9c5bbf..e10e5721b4 100644 --- a/meson.build +++ b/meson.build @@ -165,7 +165,7 @@ regression_lib = static_library('flint_regression_check', install: false, build_by_default: false, c_args: regression_c_args, - override_options: ['optimization=0'], + override_options: ['optimization=0', 'debug=false'], ) alias_target('regression-check', regression_lib)