Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add macro
trixi_include_changeprecision
to make a double precision elixir run with single precision #35Add macro
trixi_include_changeprecision
to make a double precision elixir run with single precision #35Changes from 9 commits
4cb92fd
6675e0e
d57665d
e7fd105
d294f66
9a3f3aa
87e4dfd
f720829
7b903a9
3c66e51
6b0543c
66b1d78
dd59c03
25ce3e9
c3e57aa
4dc5480
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
One more problem here. This doesn't work when, for some reason, we would include an elixir that looks like this:
It only works when we directly write the elixir as
@ranocha any ideas how to fix this?
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.
Can you special case this with something like Symbol("TrixiBase.trixi_include")?
Alternatively, @vchuravy might have an idea how this can be done?
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.
I tried, didn't work. Also, we would need to add a special case for each package that re-exports this name.
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.
This will be a
GlobalRef(mod, name)
.So
x.args[1] isa GlobalRef
and then check the name and replace it.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.
Doesn't work.
x.args[1] isa GlobalRef
isfalse
.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.
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.
But it looks like
TrixiBase.trixi_include_changeprecision
is defined... Does your test file create a module? How does it importtrixi_include
?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.
Idk. The test file just contains this single line:
And the error message says we're in
Main
.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.
Or should we merge it as is and discuss this in an issue? I don't feel like wasting more time on this edge case.
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.
I agree. IMHO if it is possible I'd just hard-code two versions for
trixi_include
andTrixiBase.trixi_include
. If that's not feasible, just put it in the docstring that you need to invoke this in a certain way.