Skip to content

Cleanup of ArbCall - #214

Merged
Joel-Dahne merged 8 commits into
masterfrom
improve-ArbCall
Jun 1, 2025
Merged

Cleanup of ArbCall#214
Joel-Dahne merged 8 commits into
masterfrom
improve-ArbCall

Conversation

@Joel-Dahne

Copy link
Copy Markdown
Collaborator

When preparing for the addition on NFLoat in #202 I had to make several larger changes to the implementation of the low level interface in ArbCall. Some of these changes are general improvements and not directly related to the addition of NFloat. None of the changes should lead to any changes for users, it mainly cleans up and refactors some of the code. The commits are mostly self contained and the commit messages describe the motivation for the changes, so I'll just refer any interested reader to those.

The previous version only handled arb_ptr and acb_ptr, it can now
handle any type ending in _ptr or _srcptr.
Previously it could return `Vector{<:Integer}`, but giving anything
other than `Vector{Int}` as an argument would return an error when
trying to convert it to `Ref{Int}`. It now just returns `Vector{Int}`.
This reduces the number of warnings about a method being overwritten
when running the tests. There are still some occurrences from the use
of `fpwrap_error_on_failure_default`, but these seem harder to
avoid (since we do need to test that the overwriting does work for
that method).
Reorder types based on where they are coming from. Remove deprecated
types from Arb that were removed in the transition to Flint.
Using the init_set! constructor to construct a Mag from an Arf
required defining arf_struct before mag_struct and Arf before Mag.
This made the ordering more confusing than necessary.

The mag_init_set in Flint just calls mag_init and arf_get_mag
internally, so removing the use of mag_init_set should not have any
noticeable performance impact. At worst we lose the benefits that
Flint gets from inlining these two together.
@Joel-Dahne

Copy link
Copy Markdown
Collaborator Author

Seems like changes to the ArbFPWrapFunction tests is not working as intended. It is doing weird stuff that is affected by world age, so something related to that could have changed. I'll take a look at it at some point.

There seems to have been some change to how world age is handled that
makes the previous versions of the test no longer work. It seems to
suffice to just define both versions of the method before using any of
them to avoid this issue.
@Joel-Dahne

Copy link
Copy Markdown
Collaborator Author

Now it seems to be working!

@Joel-Dahne
Joel-Dahne merged commit fc25c66 into master Jun 1, 2025
@Joel-Dahne
Joel-Dahne deleted the improve-ArbCall branch June 1, 2025 12:02
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.

2 participants