Skip to content

Commit

Permalink
Reorganize source files (#1167)
Browse files Browse the repository at this point in the history
* Reorganize files

* Do not automatically include details/ and remove `Details` from names

* Include KokkosExt through kokkos_ext/header

* Move space filling curves and morton code headers

* details -> detail

* Include misc headers through misc/header

* Rename to ArborX_GeometryAlgorithms.hpp

* Fix install dirs

* Fix header guards

* Rename two files to make file names unique

* Fix INSTALL_INTERFACE include dirs

Co-authored-by: Damien L-G <dalg24+github@gmail.com>
  • Loading branch information
aprokop and dalg24 authored Oct 4, 2024
1 parent 882b8ef commit 2e7ef7b
Show file tree
Hide file tree
Showing 127 changed files with 413 additions and 412 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ cmake_dependent_option(ARBORX_ENABLE_GPU_AWARE_MPI

target_include_directories(ArborX INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/details>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/geometry>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/kokkos_ext>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/cluster>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/distributed>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/interpolation>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/interpolation/details>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src/spatial>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
$<INSTALL_INTERFACE:include/ArborX>
$<INSTALL_INTERFACE:include/ArborX/details>
$<INSTALL_INTERFACE:include/ArborX/geometry>
$<INSTALL_INTERFACE:include/ArborX/kokkos_ext>
$<INSTALL_INTERFACE:include/ArborX/cluster>
$<INSTALL_INTERFACE:include/ArborX/distributed>
$<INSTALL_INTERFACE:include/ArborX/interpolation>
$<INSTALL_INTERFACE:include/ArborX/interpolation/details>
$<INSTALL_INTERFACE:include/ArborX/spatial>
)

install(TARGETS ArborX
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bvh_driver/benchmark_registration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <ArborXBenchmark_PointClouds.hpp>
#include <ArborX_Point.hpp>
#include <ArborX_Predicates.hpp>
#include <detail/ArborX_Predicates.hpp>

#include <Kokkos_Core.hpp>

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/dbscan/ArborX_DBSCANVerification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#ifndef ARBORX_DETAILSDBSCANVERIFICATION_HPP
#define ARBORX_DETAILSDBSCANVERIFICATION_HPP

#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_LinearBVH.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/dbscan/data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#ifndef DATA_HPP
#define DATA_HPP

#include <ArborX_Exception.hpp>
#include <ArborX_Point.hpp>
#include <misc/ArborX_Exception.hpp>

#include <iostream>
#include <random>
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/dbscan/dbscan_timpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

#include <ArborX_DBSCAN.hpp>
#include <ArborX_DBSCANVerification.hpp>
#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_HDBSCAN.hpp>
#include <ArborX_MinimumSpanningTree.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>

Expand Down
10 changes: 5 additions & 5 deletions benchmarks/union_find/union_find.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_DetailsKokkosExtVersion.hpp>
#include <ArborX_DetailsSortUtils.hpp>
#include <ArborX_DetailsUnionFind.hpp>
#include <ArborX_DetailsUtils.hpp>
#include <ArborX_Version.hpp>
#include <detail/ArborX_UnionFind.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>
#include <kokkos_ext/ArborX_KokkosExtVersion.hpp>
#include <misc/ArborX_SortUtils.hpp>
#include <misc/ArborX_Utils.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Random.hpp>
Expand Down
4 changes: 2 additions & 2 deletions examples/viz/tree_visualization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#include <ArborX_DetailsKokkosExtAccessibilityTraits.hpp>
#include <ArborX_DetailsTreeVisualization.hpp>
#include <ArborX_LinearBVH.hpp>
#include <detail/ArborX_TreeVisualization.hpp>
#include <kokkos_ext/ArborX_KokkosExtAccessibilityTraits.hpp>

#include <Kokkos_Core.hpp>

Expand Down
10 changes: 5 additions & 5 deletions src/ArborX.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@
#include <ArborX_DistributedTree.hpp>
#endif
#include <ArborX_CrsGraphWrapper.hpp>
#include <ArborX_Exception.hpp>
#include <ArborX_LinearBVH.hpp>
#include <ArborX_Point.hpp>
#include <ArborX_PredicateHelpers.hpp>
#include <ArborX_Predicates.hpp>
#include <ArborX_Sphere.hpp>
// FIXME: we include ArborX_DetailsUtils.hpp only for backward compatibility for
#include <detail/ArborX_PredicateHelpers.hpp>
#include <detail/ArborX_Predicates.hpp>
#include <misc/ArborX_Exception.hpp>
// FIXME: we include ArborX_Utils.hpp only for backward compatibility for
// users using deprecated functions in ArborX namespace (min, max,
// adjacentDifference, ...). This header should be removed when we remove those
// functions.
#include <ArborX_DetailsUtils.hpp>
#include <misc/ArborX_Utils.hpp>

#endif
2 changes: 1 addition & 1 deletion src/ArborX_Version.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <ArborX_Config.hpp>

#include <ArborX_DetailsKokkosExtVersion.hpp>
#include <kokkos_ext/ArborX_KokkosExtVersion.hpp>

#include <string>

Expand Down
20 changes: 10 additions & 10 deletions src/ArborX_DBSCAN.hpp → src/cluster/ArborX_DBSCAN.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
#ifndef ARBORX_DBSCAN_HPP
#define ARBORX_DBSCAN_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_Box.hpp>
#include <ArborX_DetailsCartesianGrid.hpp>
#include <ArborX_DetailsFDBSCAN.hpp>
#include <ArborX_DetailsFDBSCANDenseBox.hpp>
#include <ArborX_DetailsHalfTraversal.hpp>
#include <ArborX_DetailsKokkosExtAccessibilityTraits.hpp>
#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_DetailsSortUtils.hpp>
#include <ArborX_DetailsUtils.hpp> // sortObjects
#include <ArborX_LinearBVH.hpp>
#include <ArborX_PredicateHelpers.hpp>
#include <ArborX_Sphere.hpp>
#include <detail/ArborX_AccessTraits.hpp>
#include <detail/ArborX_CartesianGrid.hpp>
#include <detail/ArborX_FDBSCAN.hpp>
#include <detail/ArborX_FDBSCANDenseBox.hpp>
#include <detail/ArborX_HalfTraversal.hpp>
#include <detail/ArborX_PredicateHelpers.hpp>
#include <kokkos_ext/ArborX_KokkosExtAccessibilityTraits.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>
#include <misc/ArborX_SortUtils.hpp>
#include <misc/ArborX_Utils.hpp> // sortObjects

namespace ArborX
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#ifndef ARBORX_DENDROGRAM_HPP
#define ARBORX_DENDROGRAM_HPP

#include <ArborX_DetailsDendrogram.hpp>
#include <ArborX_DetailsKokkosExtSort.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_DetailsWeightedEdge.hpp>
#include <detail/ArborX_DendrogramHelpers.hpp>
#include <detail/ArborX_WeightedEdge.hpp>
#include <kokkos_ext/ArborX_KokkosExtSort.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#ifndef ARBORX_MINIMUM_SPANNING_TREE_HPP
#define ARBORX_MINIMUM_SPANNING_TREE_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_DetailsMinimumSpanningTree.hpp>
#include <ArborX_DetailsMutualReachabilityDistance.hpp>
#include <ArborX_DetailsTreeNodeLabeling.hpp>
#include <ArborX_DetailsWeightedEdge.hpp>
#include <ArborX_LinearBVH.hpp>
#include <ArborX_PredicateHelpers.hpp>
#include <detail/ArborX_AccessTraits.hpp>
#include <detail/ArborX_BoruvkaHelpers.hpp>
#include <detail/ArborX_MutualReachabilityDistance.hpp>
#include <detail/ArborX_PredicateHelpers.hpp>
#include <detail/ArborX_TreeNodeLabeling.hpp>
#include <detail/ArborX_WeightedEdge.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#ifndef ARBORX_DETAILS_MINIMUM_SPANNING_TREE_HPP
#define ARBORX_DETAILS_MINIMUM_SPANNING_TREE_HPP

#include <ArborX_DetailsAlgorithms.hpp>
#include <ArborX_DetailsHappyTreeFriends.hpp>
#include <ArborX_DetailsKokkosExtArithmeticTraits.hpp>
#include <ArborX_DetailsUtils.hpp>
#include <ArborX_DetailsWeightedEdge.hpp>
#ifndef ARBORX_BORUVKA_HELPERS_HPP
#define ARBORX_BORUVKA_HELPERS_HPP

#include <detail/ArborX_GeometryAlgorithms.hpp>
#include <detail/ArborX_HappyTreeFriends.hpp>
#include <detail/ArborX_WeightedEdge.hpp>
#include <kokkos_ext/ArborX_KokkosExtArithmeticTraits.hpp>
#include <misc/ArborX_Utils.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#ifndef ARBORX_DETAILS_CARTESIAN_GRID_HPP
#define ARBORX_DETAILS_CARTESIAN_GRID_HPP
#ifndef ARBORX_CARTESIAN_GRID_HPP
#define ARBORX_CARTESIAN_GRID_HPP

#include <ArborX_Box.hpp>
#include <ArborX_Exception.hpp>
#include <ArborX_GeometryTraits.hpp>
#include <misc/ArborX_Exception.hpp>

#include <Kokkos_Assert.hpp> // KOKKOS_ASSERT
#include <Kokkos_Macros.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#ifndef ARBORX_DETAILS_DENDROGRAM_HPP
#define ARBORX_DETAILS_DENDROGRAM_HPP
#ifndef ARBORX_DENDROGRAM_HELPERS_HPP
#define ARBORX_DENDROGRAM_HELPERS_HPP

#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp> // iota
#include <ArborX_DetailsUnionFind.hpp>
#include <detail/ArborX_UnionFind.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp> // iota

#include <Kokkos_Core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef ARBORX_DETAILSFDBSCAN_HPP
#define ARBORX_DETAILSFDBSCAN_HPP

#include <ArborX_Callbacks.hpp>
#include <ArborX_DetailsUnionFind.hpp>
#include <ArborX_PairValueIndex.hpp>
#include <ArborX_Predicates.hpp>
#include <detail/ArborX_Callbacks.hpp>
#include <detail/ArborX_PairValueIndex.hpp>
#include <detail/ArborX_Predicates.hpp>
#include <detail/ArborX_UnionFind.hpp>

#include <Kokkos_Core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#ifndef ARBORX_DETAILSFDBSCANDENSEBOX_HPP
#define ARBORX_DETAILSFDBSCANDENSEBOX_HPP

#include <ArborX_Callbacks.hpp>
#include <ArborX_DetailsCartesianGrid.hpp>
#include <ArborX_DetailsKokkosExtAccessibilityTraits.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_DetailsUnionFind.hpp>
#include <ArborX_Predicates.hpp>
#include <detail/ArborX_Callbacks.hpp>
#include <detail/ArborX_CartesianGrid.hpp>
#include <detail/ArborX_Predicates.hpp>
#include <detail/ArborX_UnionFind.hpp>
#include <kokkos_ext/ArborX_KokkosExtAccessibilityTraits.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#ifndef ARBORX_DETAILS_MUTUAL_REACHABILITY_DISTANCE_HPP
#define ARBORX_DETAILS_MUTUAL_REACHABILITY_DISTANCE_HPP
#ifndef ARBORX_MUTUAL_REACHABILITY_DISTANCE_HPP
#define ARBORX_MUTUAL_REACHABILITY_DISTANCE_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_DetailsAlgorithms.hpp>
#include <ArborX_DetailsHappyTreeFriends.hpp>
#include <ArborX_Predicates.hpp>
#include <detail/ArborX_AccessTraits.hpp>
#include <detail/ArborX_GeometryAlgorithms.hpp>
#include <detail/ArborX_HappyTreeFriends.hpp>
#include <detail/ArborX_Predicates.hpp>

#include <Kokkos_Macros.hpp>
#include <Kokkos_MinMax.hpp>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/

#ifndef ARBORX_DETAILS_WEIGHTED_EDGE_HPP
#define ARBORX_DETAILS_WEIGHTED_EDGE_HPP
#ifndef ARBORX_WEIGHTED_EDGE_HPP
#define ARBORX_WEIGHTED_EDGE_HPP

#include <Kokkos_Macros.hpp>
#include <Kokkos_MinMax.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef ARBORX_DISTRIBUTED_TREE_HPP
#define ARBORX_DISTRIBUTED_TREE_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_Box.hpp>
#include <ArborX_DetailsDistributedTreeNearest.hpp>
#include <ArborX_DetailsDistributedTreeSpatial.hpp>
#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_LinearBVH.hpp>
#include <ArborX_PairValueIndex.hpp>
#include <detail/ArborX_AccessTraits.hpp>
#include <detail/ArborX_DistributedTreeNearest.hpp>
#include <detail/ArborX_DistributedTreeSpatial.hpp>
#include <detail/ArborX_PairValueIndex.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>

#include <Kokkos_Core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
#ifndef ARBORX_DETAILS_DISTRIBUTED_TREE_IMPL_HPP
#define ARBORX_DETAILS_DISTRIBUTED_TREE_IMPL_HPP
#ifndef ARBORX_DISTRIBUTED_TREE_IMPL_HPP
#define ARBORX_DISTRIBUTED_TREE_IMPL_HPP

#include <ArborX_AccessTraits.hpp>
#include <detail/ArborX_AccessTraits.hpp>

#include <Kokkos_Core.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
#ifndef ARBORX_DETAILS_DISTRIBUTED_TREE_NEAREST_HPP
#define ARBORX_DETAILS_DISTRIBUTED_TREE_NEAREST_HPP

#include <ArborX_DetailsDistributedTreeImpl.hpp>
#include <ArborX_DetailsDistributedTreeNearestHelpers.hpp>
#include <ArborX_DetailsDistributedTreeUtils.hpp>
#include <ArborX_DetailsKokkosExtKernelStdAlgorithms.hpp>
#include <ArborX_DetailsKokkosExtStdAlgorithms.hpp>
#include <ArborX_DetailsKokkosExtViewHelpers.hpp>
#include <ArborX_Predicates.hpp>
#ifndef ARBORX_DISTRIBUTED_TREE_NEAREST_HPP
#define ARBORX_DISTRIBUTED_TREE_NEAREST_HPP

#include <detail/ArborX_DistributedTreeImpl.hpp>
#include <detail/ArborX_DistributedTreeNearestHelpers.hpp>
#include <detail/ArborX_DistributedTreeUtils.hpp>
#include <detail/ArborX_Predicates.hpp>
#include <kokkos_ext/ArborX_KokkosExtKernelStdAlgorithms.hpp>
#include <kokkos_ext/ArborX_KokkosExtStdAlgorithms.hpp>
#include <kokkos_ext/ArborX_KokkosExtViewHelpers.hpp>

#include <Kokkos_Core.hpp>
#include <Kokkos_Profiling_ScopedRegion.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
* *
* SPDX-License-Identifier: BSD-3-Clause *
****************************************************************************/
#ifndef ARBORX_DETAILS_DISTRIBUTED_TREE_NEAREST_HELPERS_HPP
#define ARBORX_DETAILS_DISTRIBUTED_TREE_NEAREST_HELPERS_HPP
#ifndef ARBORX_DISTRIBUTED_TREE_NEAREST_HELPERS_HPP
#define ARBORX_DISTRIBUTED_TREE_NEAREST_HELPERS_HPP

#include <ArborX_AccessTraits.hpp>
#include <ArborX_Callbacks.hpp>
#include <ArborX_Point.hpp>
#include <ArborX_Sphere.hpp>
#include <detail/ArborX_AccessTraits.hpp>
#include <detail/ArborX_Callbacks.hpp>

#include <Kokkos_BitManipulation.hpp>

Expand Down
Loading

0 comments on commit 2e7ef7b

Please sign in to comment.