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

Unsafe ops for fq_default #1906

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Unsafe ops for fq_default #1906

merged 2 commits into from
Oct 18, 2024

Conversation

fingolfin
Copy link
Member

No description provided.

Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 78.12500% with 7 lines in your changes missing coverage. Please review.

Project coverage is 87.27%. Comparing base (1e48bb0) to head (ec7c11d).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/flint/fq_default.jl 78.12% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1906      +/-   ##
==========================================
+ Coverage   87.25%   87.27%   +0.01%     
==========================================
  Files          97       97              
  Lines       35651    35640      -11     
==========================================
- Hits        31109    31105       -4     
+ Misses       4542     4535       -7     

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

@fingolfin fingolfin closed this Oct 17, 2024
@fingolfin fingolfin reopened this Oct 17, 2024
Copy link
Collaborator

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks mostly good. some comments to the .poly thingy

Comment on lines +438 to +442
+(x::FqFieldElem, y::$jT) = x + parent(x)(y)
+(x::$jT, y::FqFieldElem) = y + x

-(x::FqFieldElem, y::$jT) = x - parent(x)(y)
-(x::$jT, y::FqFieldElem) = parent(y)(x) - y
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't these delegate to add! or sub! as well?
Edit: I just noticed that there are no corresponding flint functions for these, but we have fallbacks in place in AA.
Edit: but this would be an endless loop...

maybe just add a comment here that these wait for a change in FLINT?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could implement add! and sub! already now without an endless loop by inserting the coercions there. But there are already tons of changes and I have to draw the line somewhere. So here I just took the code that was there, the only change is that it is now in an for ... @begin eval construct.

Someone can make these additional changes in a future iteration. There are a gazillion other things one could do in this file alone (e.g. adding set! methods to simplify the constructors). For now I'd like to move on

src/flint/fq_default.jl Outdated Show resolved Hide resolved
src/flint/fq_default.jl Show resolved Hide resolved
Co-authored-by: Lars Göttgens <lars.goettgens@rwth-aachen.de>
@lgoettgens lgoettgens enabled auto-merge (squash) October 18, 2024 10:24
@lgoettgens lgoettgens merged commit 7535e21 into master Oct 18, 2024
24 of 25 checks passed
@lgoettgens lgoettgens deleted the mh/unsafe-op-fq_default branch October 18, 2024 13:18
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.

3 participants