-
Notifications
You must be signed in to change notification settings - Fork 39
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
Move DefaultIndexableGetter
to Experimental::
and provide CTAD for Indexables
#1181
Conversation
@dalg24 Thoughts on this PR? |
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.
Please elaborate on the rational/motivation
As I recall it, in Boost that function object was about being able to extract the geometry from things like pair or tuples but here it looks like a lateral move and it is unclear to me what this improves over the status quo as currently proposed
Move to
|
Why not. We can say there is a default and define clearly what it does without making it something public. Users can deduce the type if they really want to spell it out. |
If a user wants to specify a custom bounding volume type for the hierarchy, they would have to write BVH<MemorySpace, Values, ArborX::Details::DefaultIndexableGetter, BoundingVolume> bvh(blah...); thus putting |
What benefit do we get from making it a template? Were you planing on supporting |
That is a good question. I don't have a good answer other than Boost does it. And I trust them to make good interfaces more than myself. Can you think of anything?
We already support |
I updated the PR. It no longer renames |
DefaultIndexableGetter
to Experimental::
and provide CTAD for Indexables
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.
Looks good, just wanting to confirm that the Indexables deduction guide is needed
#else | ||
KOKKOS_FUNCTION | ||
#endif | ||
Indexables(Values, IndexableGetter) -> Indexables<Values, IndexableGetter>; |
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.
Please remind me why we need to provide a user-defined deduction guide and it does not work out of the box.
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.
Implicitly-generated deduction guide for aggregates is C++20. See Notes section here.
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 would guard the deduction guides with #ifndef KOKKOS_ENABLE_CXX17
but leaving it up to you
DefaultIndexableGetter
fromDetails::
toExperimental::
Indexables