Make query sort optional
Created by: aprokop
It was discovered in Exawind that sorting is way too expensive for those meshes. There is no easy way to disable it. Right now, I have a hacky patch:
--- a/src/details/ArborX_DetailsBoundingVolumeHierarchyImpl.hpp
+++ b/src/details/ArborX_DetailsBoundingVolumeHierarchyImpl.hpp
@@ -384,9 +384,15 @@ BoundingVolumeHierarchyImpl<DeviceType>::queryDispatch(
Kokkos::Profiling::pushRegion("ArborX:BVH:sort_queries");
+#if 0
auto const permute =
Details::BatchedQueries<DeviceType>::sortQueriesAlongZOrderCurve(
bvh.bounds(), predicates);
+#else
+ Kokkos::View<size_t *> permute(
+ Kokkos::ViewAllocateWithoutInitializing("permute"), n_queries);
+ iota(permute);
+#endif
// FIXME readability! queries is a sorted copy of the predicates
auto queries = Details::BatchedQueries<DeviceType>::applyPermutation(
We need a proper API for this.