-
Notifications
You must be signed in to change notification settings - Fork 7
Consolidate plucker tests #154
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
base: main
Are you sure you want to change the base?
Conversation
gonuke
left a comment
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 looks like a great addition - thanks @Waqar-ukaea !!
I have a couple of minor suggestions/queries on the implementation details, but nothing substantive.
gonuke
left a comment
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 looks good to me - thanks for the discussion @Waqar-ukaea
pshriwise
left a comment
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.
As this is critical code, I'm going to run this through our benchmarks to ensure we don't see a difference on production models before we merge. I'll do so as soon as I can. Placing a hold here for now.
|
I've marked this as a draft as when stress testing the GPRT intersection logic implemented in I need to do some more testing with the GPRT plucker intersections on |
Curiously, rebasing the changes from this branch into my And it actually seems to perform slightly better too :/ |
This is an attempt at closing #145. The issue at hand is consolidating the two sets of plucker intersection logic between Embree and GPRT into one function that can be applied to both so we don't have to maintain two.
My approach here was to essentially create a header which has a namespace dp which is conditionally defined depending on if we are compiling slang or C++ code. So the namespace acts as a wrapper that typedefs a new dp::vec3 type to either a double3 (Slang) or a xdg::vec3da (C++) and then the function plucker_intersection_test() makes use of this dp::vec3 which maps to the respective type depending on where the header is included. The function has also of course been written in the subset of C which can compile in both C++ and Slang.
There may absolutely be a more elegant way to do this kind of single function across languages/architectures but I haven't come up with one just yet.
Templating is a nice idea and Slang does support it's own version of templates called generics but I'm not sure how I would go about combining the two cross languages/architectures.