-
Notifications
You must be signed in to change notification settings - Fork 35
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
Switch the signature for the pure callback #900
Conversation
986950c
to
91fad67
Compare
Rebased on |
91fad67
to
1e98053
Compare
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 about check_valid_callback_if_first_argument_is_not_a_view
?
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.
Any chance to get some more tests with a distinct Value
type?
Should do that. But maybe as a separate PR? And what exactly do you mean by a distinct |
It only happens in CrsGraphWrapper. As I didn't modify the 3-arg callback version, I did not need to change the check. |
1e98053
to
8e86ad4
Compare
No difference in performance benchmark (here). |
// Legacy callback wrapper | ||
template <typename Value, bool B = Legacy, | ||
typename Enable = std::enable_if_t<!B>> | ||
KOKKOS_FUNCTION auto operator()(PredicateType const &predicate, | ||
Value const &value) const | ||
{ | ||
return (*this)(predicate, (int)value.index); | ||
} | ||
|
||
KOKKOS_FUNCTION auto operator()(PredicateType const &predicate, | ||
int primitive_index) const | ||
{ |
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 is still iffy. I think this will only work with BasicBoundingVolumeHierarchy
that has Value
hardcoded to PairIndexVolume
. I hope to be able to switch the signature of the crs graph in the future, this should be the last hard task.
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 am ok with PR pending Daniel's approval (hence comment instead of formal approve)
Please squash merge
I would prefer if we could document some more what these changes actually mean in practice either with an example or a pull request to https://github.com/arborx/Wiki but I didn't mind if that's done in a follow-up. |
I would prefer to have at least 3 commits here (like the first 3). I can rebase to integrate the reviews (last 2 commits) into them if you prefer that. |
We'll do that. My first priority is getting everything in. I think I've scoped everything and know the path, but there may be some corner cases I still haven't considered. So I'm hesitant to put work into documentation right now until we get everything in, are happy with the final result, and made sure all our use cases work fine with it. |
ddfec11
to
ad0d4c0
Compare
ok with cleanup |
Everything passes except |
This PR does not touch the callbacks related to the
CrsGraphWrapper
.