Skip to content
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

Improve performance of quadtree point-to-polyline join #362

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a5f47c0
implement quadtree_point_to_nearest_polyline with thrust in the style…
trxcllnt Feb 25, 2021
ca2e630
free intermediate local_point_offsets in quadtree_point_in_polygon
trxcllnt Feb 25, 2021
d90ac5f
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Mar 31, 2021
b843069
update for set_element_async API change
trxcllnt Mar 31, 2021
e79caa9
add p2np iterator that yields point/polyline/distances in an order co…
trxcllnt Apr 7, 2021
e07483b
clean up p2np includes
trxcllnt Apr 7, 2021
7cf6461
Merge branch 'branch-0.19' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Apr 8, 2021
c061759
use thrust binary searches instead of linear search
trxcllnt Apr 8, 2021
1fa3514
fix GCC 9 RVO warning/error
trxcllnt Apr 9, 2021
cc1cb96
use new Thrust 1.12.0 make_zip_iterator instead of our custom helper
trxcllnt Apr 9, 2021
5a33ca7
update copyrights
trxcllnt Apr 9, 2021
3722176
Merge branch 'branch-0.20' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Apr 9, 2021
081ba35
Merge branch 'fix/thrust-1.12.0' into fix/quadtree-point-to-nearest-p…
trxcllnt Apr 9, 2021
782af8a
scatter reduced point/poly/distances into place
trxcllnt Apr 12, 2021
2cdc33a
deterministically handle case where distances between a point and mul…
trxcllnt Apr 12, 2021
dfe0b3e
Merge branch 'branch-0.20' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Apr 12, 2021
26253fa
use C++17 and cuDF 0.20.*
trxcllnt Apr 13, 2021
e92a56a
update README.md with latest features + markdown lint fixes
trxcllnt Apr 13, 2021
2c16c0a
Merge branch 'fix/use-c++17' into fix/quadtree-point-to-nearest-polyl…
trxcllnt Apr 13, 2021
5e8661a
sort the results of quad bbox join by quad offset
trxcllnt Apr 13, 2021
3a765d3
Merge branch 'branch-0.20' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Apr 13, 2021
d70526e
Merge branch 'branch-0.20' of github.com:rapidsai/cuspatial into fix/…
trxcllnt Apr 14, 2021
e329dd6
fix spatial join python tests for new sorting order
trxcllnt Apr 14, 2021
53adc9e
Merge branch 'branch-0.20' of github.com:rapidsai/cuspatial into fix/…
trxcllnt May 6, 2021
43bbd91
use C++17 structured binding
trxcllnt May 6, 2021
2fb630e
avoid the copies incurred by shrinking the device_uvectors
trxcllnt May 6, 2021
ced903b
remove dead code
trxcllnt May 6, 2021
f523461
call cudaMemsetAsync with an int instead of a float/double
trxcllnt May 6, 2021
1bc89b4
factor common code into point.cuh
trxcllnt May 12, 2021
82f0569
Apply suggestions from code review
trxcllnt May 18, 2021
c663e5e
fix lint
trxcllnt May 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Mark Harris <mharris@nvidia.com>
  • Loading branch information
trxcllnt and harrism authored May 18, 2021
commit 82f056965f181882f20ad5ce0d1a95e954799186
2 changes: 1 addition & 1 deletion cpp/src/join/quadtree_point_to_nearest_polyline.cu
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct compute_quadtree_point_to_nearest_polyline {
rmm::device_uvector<T> distances(point_x.size(), stream);

// Fill distances with 0
CUDA_TRY(cudaMemsetAsync(distances.data(), 0, distances.size(), stream.value()));
CUDA_TRY(cudaMemsetAsync(distances.data(), 0, distances.size() * sizeof(T), stream.value()));

// Reduce the intermediate point/polyline indices to lists of point/polyline index pairs and
// distances, selecting the polyline index closest to each point.
Expand Down
9 changes: 6 additions & 3 deletions cpp/src/utility/point_to_nearest_polyline.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ inline __device__ T point_to_poly_line_distance(T const px,
auto const y0 = poly_points_y.element<T>(i0);
auto const x1 = poly_points_x.element<T>(i1);
auto const y1 = poly_points_y.element<T>(i1);
auto const dx0 = px - x0, dy0 = py - y0;
auto const dx1 = px - x1, dy1 = py - y1;
auto const dx2 = x1 - x0, dy2 = y1 - y0;
auto const dx0 = px - x0;
auto const dy0 = py - y0;
auto const dx1 = px - x1;
auto const dy1 = py - y1;
auto const dx2 = x1 - x0;
auto const dy2 = y1 - y0;
auto const d0 = dx0 * dx0 + dy0 * dy0;
auto const d1 = dx1 * dx1 + dy1 * dy1;
auto const d2 = dx2 * dx2 + dy2 * dy2;
Expand Down