-
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
Remove APIv1 shortcuts #1182
Remove APIv1 shortcuts #1182
Conversation
ce5eb55
to
6f50471
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.
I am not sold on Iota
and I don't fully grasp why it is needed and how it fits in the big picture
@@ -178,6 +151,18 @@ KOKKOS_FUNCTION | |||
typename Details::AccessValues<Values, PrimitivesTag>::memory_space, | |||
typename Details::AccessValues<Values, PrimitivesTag>::value_type>; | |||
|
|||
template <typename ExecutionSpace, typename Values, typename 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.
Enable if ExecutionSpace is indeed an execution space {?)
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 see your point. I think it is out of scope for this PR. Rather, we would need to do that for all our deduction guides, both BVH
and BruteForce
. Or just wait for concepts.
A common user pattern is that they want to get the indices of the positive search results, like we've been doing in our original version, and possibly execute a callback on those results. As such, the hierarchy's value type would need to be |
I updated the PR to do only the part where we eliminate the APIv1 shortcuts but do no provide global |
ArborX::BoundingVolumeHierarchy bvh{ | ||
space, ArborX::Experimental::attach_indices(primitives)}; | ||
ArborX::BoundingVolumeHierarchy bvh{space, primitives, indexable_getter}; |
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 really don't see a good way to write this without Iota
.
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.
Only minor comments
Because |
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 reasonable to me.
Get out of business trying to guess user intentions. Make a user explicitly state what their desire is.
Experimental::Iota
BVH
andBruteForce
that returnView<int>
for views based onPairValueIndex<Geometry,int>
Iota
Using an
Iota
instead ofPairValueIndex
does have a performance penalty, up to 40% in some cases. On Frontier,Ultimately, I think, we would need to document it properly and provide performance suggestions for a user.