Repository navigation
Use fft_small in hensel.c only when its headers can be compiled - #410
Merged
jerebertho merged 1 commit intoNov 25, 2026
Merged
Conversation
FLINT may provide fft_small, having been built for a processor with AVX2, while msolve is compiled without AVX2. The vector types of the headers of fft_small, which hensel.c also uses, are then not defined and the compilation fails. The products of polynomial matrices by transforms are now only compiled with AVX2 and FMA or with NEON, and otherwise hensel.c keeps the products of fmpz_poly_mul. Fixes algebraic-solving#398. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jerebertho
force-pushed
the
fix-fft-small-without-avx2
branch
from
November 25, 2026 07:56
a7cbb9f to
fe8cdcf
Compare
dimpase
added a commit
to dimpase/msolve
that referenced
this pull request
Nov 25, 2026
Resolve the overlap with algebraic-solving#410 by retaining the configure-time FLINT fft_small compile check, so the Hensel code still falls back when the target cannot compile those headers. Co-authored-by: OpenAI Dot <support@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #398.
hensel.cuses the products by transforms offft_smallwhenever FLINT (3.2.0 or later) provides it. FLINT may however have been built withfft_smallfor a processor with AVX2 while msolve is compiled without AVX2, as in #398. The vector types ofmachine_vectors.h, included byfft_small.hand also used byhensel.c, are then not defined and the compilation fails.These products are now only compiled when the headers can be compiled, that is with AVX2 and FMA, or with NEON. Otherwise
hensel.ckeeps the products offmpz_poly_mul, as with older versions of FLINT.Tests with FLINT 3.6:
-mavxonly): the build fails on master and succeeds with this PR, andmake checkpasses;-mavx2 -mfma):fft_smallis still used, andmake checkpasses.The lifting of Groebner bases over QQ (
-g 2) is not affected: it only calls FLINT functions usingfft_smallinternally, and it gives the same results when built without AVX2.Some of the changes in this PR were made with the assistance of generative AI (Claude Code).
🤖 Generated with Claude Code