diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7950e9d8a..2d4abe3e4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -166,15 +166,15 @@ target_compile_definitions(ArborX_Test_DetailsCrsGraphWrapperImpl.exe PRIVATE BO target_include_directories(ArborX_Test_DetailsCrsGraphWrapperImpl.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) add_test(NAME ArborX_Test_DetailsCrsGraphWrapperImpl COMMAND ArborX_Test_DetailsCrsGraphWrapperImpl.exe) -# add_executable(ArborX_Test_Clustering.exe - # tstDBSCAN.cpp - # tstDendrogram.cpp - # utf_main.cpp -# ) -# target_link_libraries(ArborX_Test_Clustering.exe PRIVATE ArborX Boost::unit_test_framework) -# target_compile_definitions(ArborX_Test_Clustering.exe PRIVATE BOOST_TEST_DYN_LINK) -# target_include_directories(ArborX_Test_Clustering.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/benchmarks/dbscan) -# add_test(NAME ArborX_Test_Clustering COMMAND ArborX_Test_Clustering.exe) +add_executable(ArborX_Test_Clustering.exe + tstDBSCAN.cpp + tstDendrogram.cpp + utf_main.cpp +) +target_link_libraries(ArborX_Test_Clustering.exe PRIVATE ArborX Boost::unit_test_framework) +target_compile_definitions(ArborX_Test_Clustering.exe PRIVATE BOOST_TEST_DYN_LINK) +target_include_directories(ArborX_Test_Clustering.exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/benchmarks/dbscan) +add_test(NAME ArborX_Test_Clustering COMMAND ArborX_Test_Clustering.exe) # compare results with a dataset of 1000 points from mlpack configure_file( @@ -189,9 +189,9 @@ configure_file( ) add_executable(ArborX_Test_DetailsClusteringHelpers.exe tstDetailsTreeNodeLabeling.cpp - # tstDetailsMutualReachabilityDistance.cpp - # tstMinimumSpanningTree.cpp - # tstMinimumSpanningTreeGoldenTest.cpp + tstDetailsMutualReachabilityDistance.cpp + tstMinimumSpanningTree.cpp + tstMinimumSpanningTreeGoldenTest.cpp tstUnionFind.cpp utf_main.cpp ) diff --git a/test/tstDetailsMutualReachabilityDistance.cpp b/test/tstDetailsMutualReachabilityDistance.cpp index 62476f689..dbc1a15ee 100644 --- a/test/tstDetailsMutualReachabilityDistance.cpp +++ b/test/tstDetailsMutualReachabilityDistance.cpp @@ -24,11 +24,9 @@ namespace Test using ArborXTest::toView; template -auto compute_core_distances( - ExecutionSpace exec_space, - std::vector> const - &points_host, - int k) +auto compute_core_distances(ExecutionSpace exec_space, + std::vector const &points_host, + int k) { auto points = toView(points_host, "Test::points"); @@ -36,7 +34,7 @@ auto compute_core_distances( using MemorySpace = typename ExecutionSpace::memory_space; ArborX::BasicBoundingVolumeHierarchy< MemorySpace, ArborX::Details::PairIndexVolume> - bvh{exec_space, points}; + bvh{exec_space, ArborX::Details::LegacyValues{points, ArborX::Point{}}}; Kokkos::View distances( Kokkos::view_alloc(Kokkos::WithoutInitializing, "Test::core_distances"), bvh.size()); @@ -100,9 +98,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(compute_core_distances, DeviceType, using ExecutionSpace = typename DeviceType::execution_space; ExecutionSpace exec_space; - std::vector> points{ - {0, {0, 0, 0}}, {1, {1, 0, 0}}, {2, {2, 0, 0}}, - {3, {3, 0, 0}}, {4, {4, 0, 0}}, + std::vector points{ + {0, 0, 0}, {1, 0, 0}, {2, 0, 0}, {3, 0, 0}, {4, 0, 0}, }; ARBORX_TEST_COMPUTE_CORE_DISTANCES(exec_space, points, 1, (std::vector{0, 0, 0, 0, 0}));