-
Notifications
You must be signed in to change notification settings - Fork 38
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 to using Query in insert generator and tree traversal #305
Conversation
Comparing 8f22a7e with 722e82a:
The most problematic are 1M hollow meshes on CUDA, about 5-7% slowdown. But this is acceptable. |
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 PR comes too early.
Without introducing the overload
template <typename ExecutionSpace, typename Predicates, typename Callback>
BVH::query(ExecutionSpace const &, Predicates const &, Callback const &);
and observing that the change you propose reconciliate the signature of the user-provided callback with what actually happens in the tree traversal implementation, this PR has a very weak rational.
And even so, say we have already introduced the new query
overload, we would probably still need to make the case that this is better than wrapping the user callback.
using NativePredicateType = std::decay_t<decltype( | ||
Traits::Access<Predicates, Traits::PredicatesTag>::get( | ||
std::declval<Predicates const &>(), std::declval<int>()))>; | ||
|
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.
using NativePredicateType = std::decay_t<decltype( | |
Traits::Access<Predicates, Traits::PredicatesTag>::get( | |
std::declval<Predicates const &>(), std::declval<int>()))>; | |
using NativePredicateType = typename Traits::Helper<Access>::type; |
{ | ||
auto const predicate_index = getData(query); | ||
auto const &predicate = static_cast<NativePredicateType const &>(query); |
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.
Comment that you are slicing. This is easy to overlook.
OK, we can close this right now if you want. I wanted to show that there is a way to change the callback inside tree traversal to be closer to what we want with minor performance penalty. |
No description provided.