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

Remove more calls to gap_to_julia #4634

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

lgoettgens
Copy link
Member

@lgoettgens lgoettgens commented Feb 24, 2025

More progress towards #4625

@lgoettgens lgoettgens added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Feb 24, 2025
@lgoettgens lgoettgens requested a review from fingolfin February 24, 2025 16:08
@@ -240,7 +240,7 @@ end
## GAP straight line program
function straight_line_program(slp::GapObj)
@req GAP.Globals.IsStraightLineProgram(slp) "slp must be a straight line program in GAP"
lines = GAP.gap_to_julia(GAP.Globals.LinesOfStraightLineProgram(slp); recursive = true)
lines = Vector{Any}(GAP.Globals.LinesOfStraightLineProgram(slp))
Copy link
Member

Choose a reason for hiding this comment

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

Does this work? It might avoid a conversion when constructing the SLP.GAPSLProgram

Suggested change
lines = Vector{Any}(GAP.Globals.LinesOfStraightLineProgram(slp))
lines = Vector{GAPStraightLine}(GAP.Globals.LinesOfStraightLineProgram(slp))

Copy link
Member Author

Choose a reason for hiding this comment

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

nope, I tried that. But the conversion code is not capable of deciding which of the union elem types to convert each element of the vector to

Copy link
Member

Choose a reason for hiding this comment

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

OK makes sense.

@fingolfin fingolfin merged commit 0c1a432 into oscar-system:master Feb 24, 2025
33 checks passed
@lgoettgens lgoettgens deleted the lg/more-gap-to-julia branch February 24, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants