-
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
Finalize BasicBoundingVolumeHierarchy #915
Conversation
Added wiki (see opening post). |
Any reason not to create a pull request for the Wiki at this point? |
Created. I found it inconvenient to browse a PR, but now anyone can edit. |
be54657
to
732dfd0
Compare
OK, I removed |
732dfd0
to
f631ac2
Compare
Huge performance regressions, investigating. |
23e46e1
to
88e7990
Compare
SummitMST HACC 37Mmaster (2d3c687)
branch (e557644)
MST 5D VisualSim 10Mmaster (2d3c687)
branch (e557644)
DBSCAN HACC 37Mmaster (2d3c687)
branch (e557644)
|
@dalg24 OK, this should be ready. Please review. |
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 think the biggest question is how to expose this new interface to users who are using BVH
directly. Should we create a new class and deprecate BVH
or rather a backward incompatible change?
This is indeed the big question. I think in order to deprecate the old class, we would need to provide something new in the |
@masterleinad @dalg24 Addressed all your comments. |
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.
Fine with me.
@dalg24 Done. |
34d74fc
to
9eebbd9
Compare
If both DefaultIndexableGetter has const ref pair argument, and Indexables have decltype(auto) return, this ends up in a wrong result (likely to the handling of temporaries). This leads to a default-initialized scene bounding box, which leads to same Morton codes, which leads to f-d up hierarchy. Providing a second operator()(PairIndexVolume<Geometry> &&pair) operator in DefaultIndexableGetter fixes that.
9eebbd9
to
0fdfa87
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.
Minor comments. Pretty good overall.
test/CMakeLists.txt
Outdated
"using KDOP6 = ArborX::Experimental::KDOP<6>;\n" | ||
"using KDOP14 = ArborX::Experimental::KDOP<14>;\n" | ||
"using KDOP18 = ArborX::Experimental::KDOP<18>;\n" | ||
"using KDOP26 = ArborX::Experimental::KDOP<26>;\n" | ||
"template <class MemorySpace> using ArborX__BoundingVolumeHierarchy_${_bounding_volume} = ArborX::BasicBoundingVolumeHierarchy<MemorySpace, ArborX::Details::PairIndexVolume<${_bounding_volume}>, ArborX::Details::DefaultIndexableGetter, ${_bounding_volume}>;\n" | ||
"template <class MemorySpace>\n" | ||
"using ArborX__BoundingVolumeHierarchy_${_bounding_volume} =\n" |
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.
We only want to test the legacy code path 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.
Yes. BVH
only has MemorySpace
, no bounding volume, so impossible to run KDOPs with.
"#define ARBORX_TEST_TREE_TYPES Tuple<ArborX::BVH>\n" | ||
"#include \"ArborXTest_LegacyTree.hpp\"\n" | ||
"template <class MemorySpace>\n" | ||
"using ArborX_Legacy_BasicBVH_Box =\n" |
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.
A bit long mangled name would have done ArborX_LegacyBVH
but not blocking
"template <class MemorySpace> using ArborX__BoundingVolumeHierarchy_${_bounding_volume} = ArborX::BasicBoundingVolumeHierarchy<MemorySpace, ArborX::Details::PairIndexVolume<${_bounding_volume}>, ArborX::Details::DefaultIndexableGetter, ${_bounding_volume}>;\n" | ||
"#define ARBORX_TEST_TREE_TYPES Tuple<ArborX__BoundingVolumeHierarchy_${_bounding_volume}>\n" | ||
"template <class MemorySpace>\n" | ||
"using ArborX_Legacy_BasicBVH_${_bounding_volume} =\n" |
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.
Would drop the "basic" and say ArborX_LegacyBVH_
. also not blocking
I added a Wiki to document the current state (though, Wiki contains
RangeTraits
which are not part of this PR).Generally, I think
BasicBoundingVolumeHierarchy
is close to done. The things that remain:UseRangeAdaptor
instead ofAccessTraits
Parameters
, similar to boost:Worth thinking if
BVH<MemorySpace, Value, IndexableGetter, Parameters...>
is what we want, whereParameters...
could include bounding volume and other parameters governing tree structure in the future.We may also want to consider providing some convenient way to build a hierarchy based on pairs index + geometry, as that is a common use case. Maybe, rename
LegacyValues
to something more palatable to a user.