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

Resolve some JET warnings #2812

Merged
merged 1 commit into from
Sep 19, 2023
Merged

Conversation

fingolfin
Copy link
Member

... about captured variables and runtime dispatch

Just the tip of the iceberg, but I figured I should already submit this, as I don't know when/if I'll be able to work through all the output produced by JET....

@fieker this touches some of your code, too

... about captured variables and runtime dispatch
@@ -57,15 +56,15 @@ function _mod_p_to_a_kernel(G::Union{zzModMatrix, ZZModMatrix}, a, p)
end
end
for h in gensk
g = deepcopy(E)
g = identity_matrix(R, n)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whats the problem with this one?

Copy link
Member Author

Choose a reason for hiding this comment

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

In at least one of the functions, it redefined E to different things, and these objects are then captured in closures; it is not happy that E is redefined then. It seemed simplest to just replace all those deepcopy calls by direct calls to identity_matrix (IMHO makes it easier to read).

@fingolfin fingolfin enabled auto-merge (squash) September 19, 2023 13:48
@fingolfin fingolfin disabled auto-merge September 19, 2023 21:22
@fingolfin fingolfin merged commit 0b1f5f7 into oscar-system:master Sep 19, 2023
@fingolfin fingolfin deleted the mh/capture branch September 19, 2023 21:23
fieker pushed a commit that referenced this pull request Sep 29, 2023
... about captured variables and runtime dispatch
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