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 {flag?} MPI function #718
Add {flag?} MPI function #718
Changes from 2 commits
e478baa
4226d80
66d515f
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.
Perhaps we should note in both this code and in has_flag that any change needs to be made in both places?
Ideally, we'd unify these 2 case statements in some way since it looks like this has a lot of overlap with has_flag's code. However, there's also such a thing as optimizing yourself until you're weary, so if you rather put a TODO and a note that both places need to be changed, I wouldn't judge you :)
If you wanted to go the extra mile, though, I'd say make a str_to_flag call that has this case statement, then both has_flag and prim_set can use it (along with anywhere else this mess lives).
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.
str_to_flag is definitely coming - just wanted to see if I could be clever with ALL the flag checking. I can certainly add str_to_flag to this PR in the meantime so it definitely doesn't wait for a unified process.
It may have been added when I got to fully reviewing p_db.c :)
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 think both changes are made. Please review; I think everything's in order...
I'm not too thrilled about the duplicate "truewizard" check, but it seemed like the best way (right now?) to preserve the different meanings for
SET
andFLAG?
.do_set is on notice as needing a change, too, but it uses both the str_to_flag logic and the restricted function (while introducing its own restrictions) and will take more thought.