Skip to content

ArborX neighbor search #250

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

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a475a16
Switch compressed row radius neighbor search to use ArborX
kuberry Sep 23, 2021
9d6bb95
Add ArborX to arborx folder at SHA 3ff6ce508f0fee7
kuberry Sep 23, 2021
44766f8
Update Kokkos to tag 3.1.00
kuberry Sep 23, 2021
d809fde
Add conversion from neighbor list accessor to 2D array
kuberry Sep 24, 2021
6ce7bde
Two phase radius neighbor search completed for 2D array fill
kuberry Sep 24, 2021
a4b47b6
Switch to AccessTraits for ArborX BVH initialization
kuberry Sep 25, 2021
41df68a
Switch to AccessTraits for ArborX query
kuberry Sep 25, 2021
5315407
Clean up unused variables and assertions
kuberry Sep 25, 2021
7c44d2c
Changed spaces to host so that neighbor search works on host with GPU
kuberry Sep 25, 2021
7a4a5f9
Switched KNN search over to ArborX
kuberry Sep 27, 2021
84582c9
Add check_same option to neighbor search
kuberry Sep 27, 2021
4f24ba2
Added Compadre_USE_ARBORX option to CMake
kuberry Sep 27, 2021
57b5ae4
Fix bug in checking neighbors are same between dry-run and real search
kuberry Sep 27, 2021
9da2880
Add debugging statement to neighbor search to expose that ArborX uses…
kuberry Sep 28, 2021
1c87603
Prune unneeded ArborX files/directories
kuberry Sep 28, 2021
e15e217
ArborX radius search working on GPU
kuberry Sep 28, 2021
db935f8
ArborX nearest neighbor search working on GPU
kuberry Sep 29, 2021
0bc39fe
Added search_scalar type and SEARCH_SCALAR_EPS, modify neighbor test …
kuberry Oct 1, 2021
61a1a1f
Move arborx to src/tpl folder
kuberry Oct 1, 2021
7382af1
Update CMake logic for arborx source files move
kuberry Oct 1, 2021
1649ae4
Remove unneeded arborx files
kuberry Oct 1, 2021
027dd6e
Prune more arborx files
kuberry Oct 1, 2021
20ddfb3
Prune even more arborx files
kuberry Oct 1, 2021
f42ed1c
Update search using ArborX to reflect neighbors included with distanc…
kuberry Oct 1, 2021
cd38160
Remove need for dry run for ArborX searches
kuberry Oct 1, 2021
f8daa0c
Remove all dry-run followed by real-run neighbor search in examples (…
kuberry Oct 1, 2021
8517bfb
Converted Nanoflann search to recursively call itself
kuberry Oct 1, 2021
c623f05
Remove dry-run parameter from KNN searches (ArborX and Nanoflann)
kuberry Oct 1, 2021
5abad79
Made rank 2 layout searches for ArborX and Nanoflann common
kuberry Oct 1, 2021
d1c57c5
Use Andrey's update for sorting on CPU
kuberry Oct 2, 2021
e5ef340
Everything inside of PointCloudSearch now performed on device for ArborX
kuberry Oct 4, 2021
2b66847
Make resizes conditional on size check for ArborX
kuberry Oct 4, 2021
46191bd
Remove unneeded fences following deep_copy
kuberry Oct 4, 2021
f4c9a3a
Explicitly add ArborX to Compadre_EXT_DEPS list and set PREFIX
kuberry Oct 4, 2021
6927e7e
Set CMAKE_BUILD_TYPE to "" to avoid default of ReleaseWithDebInfo fro…
kuberry Oct 5, 2021
c094150
Refactored quadrature choice to avoid compiler warnings
kuberry Oct 5, 2021
034fcb1
Add default constructor to Points struct
kuberry Oct 28, 2021
4553d7a
Change KOKKOS_LAMBDAs on host to [&]
kuberry Oct 31, 2021
c421afe
Remove several unneeded deep_copy's in PointCloudSearch_ArborX
kuberry Nov 1, 2021
ee0cf02
Fix Kokkos:Serial copy typo
kuberry Nov 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ else() # Raw CMake Project
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR} ${CMAKE_INSTALL_RPATH})
if (NOT(CMAKE_BUILD_TYPE))
set(CMAKE_BUILD_TYPE "")
endif()
if (CMAKE_BUILD_TYPE STREQUAL "")
if (NOT(CMAKE_CXX_FLAGS) OR (CMAKE_CXX_FLAGS STREQUAL ""))
set(CMAKE_CXX_FLAGS " -O3 -g")
endif()
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
else()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}} ${CMAKE_CXX_FLAGS}")
endif()

# RPATH should always include the folder it is called from
bob_option(PYTHON_CALLING_BUILD "Python setuptools calling build" OFF)
Expand Down Expand Up @@ -352,7 +364,6 @@ else() # Raw CMake Project
endif()



#MPI (Not really needed, only used so that if a kokkos-tool was built with MPI, it won't segfault)
if (Compadre_USE_MPI)
FIND_PACKAGE(MPI QUIET)
Expand All @@ -378,6 +389,7 @@ else() # Raw CMake Project

bob_option(Compadre_TESTS "Compile Compadre tests" ON)
bob_option(Compadre_EXAMPLES "Compile Compadre examples" "${Compadre_TESTS}")
bob_option(Compadre_USE_ARBORX "Use ArborX for neighbor search" OFF)


endif()
Expand All @@ -400,6 +412,7 @@ set(Compadre_KEY_BOOLS
Compadre_USE_CUDA
Compadre_USE_MPI
Compadre_USE_PYTHON
Compadre_USE_ARBORX
)

set(Compadre_KEY_INTS
Expand Down
22 changes: 5 additions & 17 deletions examples/GMLS_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,12 @@ bool all_passed = true;
double epsilon_multiplier = 1.4;

// neighbor_lists_device will contain all neighbor lists (for each target site) in a compressed row format
// Initially, we do a dry-run to calculate neighborhood sizes before actually storing the result. This is
// why we can start with a neighbor_lists_device size of 0.
Kokkos::View<int*> neighbor_lists_device("neighbor lists",
0); // first column is # of neighbors
Kokkos::View<int*> neighbor_lists_device("neighbor lists", 0);
Kokkos::View<int*>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// number_of_neighbors_list must be the same size as the number of target sites so that it can be populated
// with the number of neighbors for each target site.
Kokkos::View<int*> number_of_neighbors_list_device("number of neighbor lists",
number_target_coords); // first column is # of neighbors
Kokkos::View<int*> number_of_neighbors_list_device("number of neighbor lists", number_target_coords);
Kokkos::View<int*>::HostMirror number_of_neighbors_list = Kokkos::create_mirror_view(number_of_neighbors_list_device);

// each target site has a window size
Expand All @@ -218,17 +215,7 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
//
// This dry run populates number_of_neighbors_list with neighborhood sizes
size_t storage_size = point_cloud_search.generateCRNeighborListsFromKNNSearch(true /*dry run*/, target_coords, neighbor_lists,
number_of_neighbors_list, epsilon, min_neighbors, epsilon_multiplier);

// resize neighbor_lists_device so as to be large enough to contain all neighborhoods
Kokkos::resize(neighbor_lists_device, storage_size);
neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// query the point cloud a second time, but this time storing results into neighbor_lists
point_cloud_search.generateCRNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generateCRNeighborListsFromKNNSearch(target_coords, neighbor_lists,
number_of_neighbors_list, epsilon, min_neighbors, epsilon_multiplier);

//! [Performing Neighbor Search]
Expand All @@ -244,6 +231,7 @@ bool all_passed = true;
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(number_of_neighbors_list_device, number_of_neighbors_list);
Kokkos::deep_copy(epsilon_device, epsilon);
Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_DivergenceFree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,8 @@ bool all_passed = true;
// the number of neighbors for that rows corresponding target site
// for the default values in this test, the multiplier is suggested to be 2.2
double epsilon_multiplier = 2.2;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -191,7 +188,7 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);

//! [Performing Neighbor Search]
Expand All @@ -207,6 +204,7 @@ bool all_passed = true;
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
12 changes: 3 additions & 9 deletions examples/GMLS_Manifold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,8 @@ Kokkos::initialize(argc, args);
Kokkos::View<double*, Kokkos::DefaultExecutionSpace> epsilon_device("h supports", number_target_coords);
Kokkos::View<double*>::HostMirror epsilon = Kokkos::create_mirror_view(epsilon_device);

size_t storage_size = point_cloud_search.generateCRNeighborListsFromKNNSearch(true /*dry run*/, target_coords, neighbor_lists,
number_of_neighbors_list, epsilon, min_neighbors, epsilon_multiplier);

// resize neighbor_lists_device so as to be large enough to contain all neighborhoods
Kokkos::resize(neighbor_lists_device, storage_size);
neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// query the point cloud a second time, but this time storing results into neighbor_lists
point_cloud_search.generateCRNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
// search
point_cloud_search.generateCRNeighborListsFromKNNSearch(target_coords, neighbor_lists,
number_of_neighbors_list, epsilon, min_neighbors, epsilon_multiplier);

// Diagnostic for neighbors found
Expand All @@ -259,6 +252,7 @@ Kokkos::initialize(argc, args);
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(number_of_neighbors_list_device, number_of_neighbors_list);
Kokkos::deep_copy(epsilon_device, epsilon);
Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_Manifold_Multiple_Evaluation_Sites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,8 @@ Kokkos::initialize(argc, args);
// each row is a neighbor list for a target site, with the first column of each row containing
// the number of neighbors for that rows corresponding target site
double epsilon_multiplier = 1.7;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -254,7 +251,7 @@ Kokkos::initialize(argc, args);
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);

//! [Performing Neighbor Search]
Expand All @@ -270,6 +267,7 @@ Kokkos::initialize(argc, args);
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_Multiple_Evaluation_Sites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,8 @@ bool all_passed = true;
// each row is a neighbor list for a target site, with the first column of each row containing
// the number of neighbors for that rows corresponding target site
double epsilon_multiplier = 1.5;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -242,7 +239,7 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);


Expand All @@ -259,6 +256,7 @@ bool all_passed = true;
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_NeumannGradScalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,8 @@ bool all_passed = true;
// each row is a neighbor list for a target site, with the first column of each row containing
// the number of neighbors for that rows corresponding target site
double epsilon_multiplier = 1.8;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -214,7 +211,7 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);

//! [Performing Neighbor Search]
Expand All @@ -230,6 +227,7 @@ bool all_passed = true;
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
9 changes: 4 additions & 5 deletions examples/GMLS_SmallBatchReuse_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,8 @@ bool all_passed = true;
// each row is a neighbor list for a target site, with the first column of each row containing
// the number of neighbors for that rows corresponding target site
double epsilon_multiplier = 1.5;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> single_neighbor_lists_device("neighbor lists",
1, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> single_neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror single_neighbor_lists = Kokkos::create_mirror_view(single_neighbor_lists_device);

// each target site has a window size
Expand All @@ -270,16 +267,18 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, single_target_coords,
point_cloud_search.generate2DNeighborListsFromKNNSearch(single_target_coords,
single_neighbor_lists, single_epsilon, min_neighbors, epsilon_multiplier);


//! [Performing Neighbor Search]


// Copy data back to device (they were filled on the host)
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(single_neighbor_lists_device, single_neighbor_lists.extent(0), single_neighbor_lists.extent(1));
Kokkos::deep_copy(single_neighbor_lists_device, single_neighbor_lists);
Kokkos::deep_copy(single_epsilon_device, single_epsilon);
Kokkos::fence(); // let call to build neighbor lists complete before copying back to device
Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_Staggered.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,8 @@ bool all_passed = true;
// the number of neighbors for that rows corresponding target site
// for the default values in this test, the multiplier is suggested to be 2.2
double epsilon_multiplier = 2.2;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -208,7 +205,7 @@ bool all_passed = true;
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);

//! [Performing Neighbor Search]
Expand All @@ -224,6 +221,7 @@ bool all_passed = true;
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
8 changes: 3 additions & 5 deletions examples/GMLS_Staggered_Manifold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,8 @@ Kokkos::initialize(argc, args);
// each row is a neighbor list for a target site, with the first column of each row containing
// the number of neighbors for that rows corresponding target site
double epsilon_multiplier = 1.5;
int estimated_upper_bound_number_neighbors =
point_cloud_search.getEstimatedNumberNeighborsUpperBound(min_neighbors, dimension, epsilon_multiplier);

Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists",
number_target_coords, estimated_upper_bound_number_neighbors); // first column is # of neighbors
Kokkos::View<int**, Kokkos::DefaultExecutionSpace> neighbor_lists_device("neighbor lists", 0, 0);
Kokkos::View<int**>::HostMirror neighbor_lists = Kokkos::create_mirror_view(neighbor_lists_device);

// each target site has a window size
Expand All @@ -198,7 +195,7 @@ Kokkos::initialize(argc, args);
// query the point cloud to generate the neighbor lists using a kdtree to produce the n nearest neighbor
// to each target site, adding (epsilon_multiplier-1)*100% to whatever the distance away the further neighbor used is from
// each target to the view for epsilon
point_cloud_search.generate2DNeighborListsFromKNNSearch(false /*not dry run*/, target_coords, neighbor_lists,
point_cloud_search.generate2DNeighborListsFromKNNSearch(target_coords, neighbor_lists,
epsilon, min_neighbors, epsilon_multiplier);


Expand All @@ -215,6 +212,7 @@ Kokkos::initialize(argc, args);
// We could have filled Kokkos Views with memory space on the host
// and used these instead, and then the copying of data to the device
// would be performed in the GMLS class
Kokkos::resize(neighbor_lists_device, neighbor_lists.extent(0), neighbor_lists.extent(1));
Kokkos::deep_copy(neighbor_lists_device, neighbor_lists);
Kokkos::deep_copy(epsilon_device, epsilon);

Expand Down
Loading