Skip to content

Port some modular composition methods to generics - #2190

Merged
fredrik-johansson merged 8 commits into
flintlib:mainfrom
fredrik-johansson:compose
Jan 27, 2025
Merged

Port some modular composition methods to generics#2190
fredrik-johansson merged 8 commits into
flintlib:mainfrom
fredrik-johansson:compose

Conversation

@fredrik-johansson

@fredrik-johansson fredrik-johansson commented Jan 27, 2025

Copy link
Copy Markdown
Collaborator

Adds the following methods (plus underscore version) and replaces the counterparts in fmpz_mod_poly and fq_poly_templates with wrappers:

  • gr_poly_mulmod
  • gr_poly_mulmod_preinv
  • gr_poly_compose_mod_horner
  • gr_poly_compose_mod_brent_kung
  • gr_poly_compose_mod
  • gr_poly_compose_mod_horner_preinv
  • gr_poly_compose_mod_brent_kung_preinv
  • gr_poly_compose_mod_preinv
  • _gr_poly_reduce_matrix_mod_poly
  • gr_poly_precompute_matrix
  • gr_poly_compose_mod_brent_kung_precomp_preinv

All have been ported from fq_poly_templates, with a few minor optimizations.

There are some interfaces I would like to change, and some of the methods need clearer specifications, in particular with respect to error handling. However, my goal for now is just to keep the fq_poly conventions to facilitate porting the polynomial factorization code to generics.

Note: this PR decreases the library size though here is a net + lines of code since some legacy functions and their tests can't be removed yet. Once the factorization code is ported to generics we will be able to remove more code.

@fredrik-johansson
fredrik-johansson merged commit 2b1acf8 into flintlib:main Jan 27, 2025
@fredrik-johansson
fredrik-johansson deleted the compose branch January 27, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant