-
Notifications
You must be signed in to change notification settings - Fork 200
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 performance-/precompilation-time harmful @eval
#3556
Conversation
@eval $parentM = zeros($FT, $metric_size...) | ||
@eval $metric = OffsetArray(on_architecture($arch, $parentM), $offsets...) | ||
end | ||
Δxᶠᶜ = OffsetArray(zeros(FT, arch, metric_size...), offsets...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I am questioning the use of eval
from the beginning :)
You were defining new global variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what was the purpose of the @eval
?
The next one I ran into is
So one alternative is to use named tuples instead of variables.
|
Co-authored-by: Gregory L. Wagner <[email protected]>
I think we need to look at all eval usage I hit:
next. Which probably should be |
…s.jl into ss/remove-harmful-eval
Co-authored-by: Gregory L. Wagner <[email protected]>
@eval
@eval
@simone-silvestri are you going to shepherd this through to completion? |
Co-authored-by: Gregory L. Wagner <[email protected]>
I couldn't find any other |
this should be ready to merge |
this PR fixes the issue of having
@eval
inside callable functions not resolved at compile timecloses #3555
cc @vchuravy