-
Notifications
You must be signed in to change notification settings - Fork 309
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
Update count_if_e, transform_reduce_e, and transform_e to support edge masking #4001
Update count_if_e, transform_reduce_e, and transform_e to support edge masking #4001
Conversation
@jnke2016 FYI |
…to fea_transform_e_mask
/ok to test |
…to fea_transform_e_mask
…nto fea_transform_e_mask
…to fea_transform_e_mask
…to fea_transform_e_mask
edge_mask_view_ = edge_mask_view; | ||
} | ||
|
||
void clear_edge_mask() { edge_mask_view_ = std::nullopt; } |
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 have no preference. Is there a reason to prefer this syntax over edge_mask_view_.reset()
?
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 assume they are same. I guess mainly personal preference.
According to
https://stackoverflow.com/questions/47441623/how-to-assign-nothing-to-stdoptionalt
It seems like = {}
or = std::nullopt
were initially recommended and .reset()
is added later.
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 consistency matters, so if we are mainly using .reset()
elsewhere in our codebase, I am OK to make a change.
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.
That was my assessment. A quick check in the code, I see a few calls to .reset()
and a bunch more assignments to std::nullopt
.
I'm going to merge this PR. We should probably pick a way and create a PR to update things to be consistent.
/merge |
Update transform_e to support graphs with edge masking. This is necessary for K-truss.