Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conform Nemo to new FLINT random struct #1750

Merged
merged 1 commit into from
May 14, 2024

Conversation

albinahlback
Copy link
Contributor

Due to flintlib/flint#1964:

  • The GMP-state in a FLINT random context structure will no longer be expanded inside the struct, but rather a pointer to it. Hence, make Nemo compatible with this.

  • Do not use flint_rand_alloc and flint_rand_free for allocating the FLINT random context structure. This is in order to be able to use the same code for the new version of FLINT as well as the old version.

  • Use the new symbol names for the FLINT random functions if they are available. This is checked during the initialization of Nemo, where we check for the new symbol flint_rand_init.

* The GMP-state in a FLINT random context structure will no longer be
  expanded inside the struct, but rather a pointer to it. Hence, make
  Nemo compatible with this.

* Do not use `flint_rand_alloc` and `flint_rand_free` for allocating the
  FLINT random context structure. This is in order to be able to use
  the same code for the new version of FLINT as well as the old version.

* Use the new symbol names for the FLINT random functions if they are
  available. This is checked during the initialization of Nemo, where we
  check for the new symbol `flint_rand_init`.
Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 40.74074% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 84.80%. Comparing base (69f5c85) to head (63fa792).

Files Patch % Lines
src/flint/FlintTypes.jl 31.25% 11 Missing ⚠️
src/Nemo.jl 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1750      +/-   ##
==========================================
- Coverage   84.82%   84.80%   -0.03%     
==========================================
  Files          95       95              
  Lines       36957    36968      +11     
==========================================
  Hits        31350    31350              
- Misses       5607     5618      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lgoettgens lgoettgens requested a review from thofma May 13, 2024 08:49
@thofma
Copy link
Member

thofma commented May 14, 2024

Seems to not break anything for flint 3.1. No clue if this works for flint#master, since it is not tested.

@thofma thofma merged commit 1c99647 into Nemocas:master May 14, 2024
24 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants