From 61e386b8b16fa4b5688bd915efb117c7a213b73e Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 17 Jun 2022 18:04:06 -0500 Subject: [PATCH] Add missing Thrust includes (#539) ## Description This PR cleans up some `#include`s for Thrust. This is meant to help with the transition to Thrust 1.17 when that is updated in rapids-cmake (https://github.com/rapidsai/rapids-cmake/pull/199). ## Context Version 1.16 of Thrust reduced the number of internal header inclusions: > [#1572](https://github.com/NVIDIA/thrust/pull/1572) Removed several unnecessary header includes. Downstream projects may need to update their includes if they were relying on this behavior. I am making similar changes across all RAPIDS libraries to clean up includes ("include what we use," in essence) to make sure we have compatibility with future versions of Thrust. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Mark Harris (https://github.com/harrism) - Vyas Ramasubramani (https://github.com/vyasr) URL: https://github.com/rapidsai/cuspatial/pull/539 --- cpp/benchmarks/hausdorff_benchmark.cpp | 2 ++ cpp/include/cuspatial/experimental/type_utils.hpp | 1 + cpp/src/indexing/construction/detail/phase_1.cuh | 9 +++++++++ cpp/src/indexing/construction/detail/phase_2.cuh | 14 ++++++++++++++ cpp/src/indexing/construction/point_quadtree.cu | 10 ++++++++++ cpp/src/interpolate/cubic_spline.cu | 3 +++ cpp/src/join/detail/intersection.cuh | 2 ++ cpp/src/join/detail/traversal.cuh | 6 ++++++ cpp/src/join/quadtree_point_in_polygon.cu | 3 +++ cpp/src/join/quadtree_point_to_nearest_polyline.cu | 7 +++++++ cpp/src/join/quadtree_poly_filtering.cu | 6 ++++++ cpp/src/spatial/hausdorff.cu | 2 ++ cpp/src/spatial/linestring_distance.cu | 3 +++ cpp/src/spatial/lonlat_to_cartesian.cu | 5 +++++ cpp/src/spatial/polygon_bounding_box.cu | 3 +++ cpp/src/spatial/polyline_bounding_box.cu | 3 +++ cpp/src/trajectory/derive_trajectories.cu | 3 +++ cpp/src/trajectory/trajectory_bounding_boxes.cu | 5 +++++ .../trajectory/trajectory_distances_and_speeds.cu | 7 +++++++ cpp/src/utility/scatter_output_iterator.cuh | 3 +++ cpp/tests/join/point_in_polygon_test_large.cpp | 3 +++ cpp/tests/spatial/hausdorff_test.cpp | 1 + cpp/tests/spatial/point_in_polygon_test.cpp | 3 +++ .../test_trajectory_distances_and_speeds.cu | 2 ++ 24 files changed, 106 insertions(+) diff --git a/cpp/benchmarks/hausdorff_benchmark.cpp b/cpp/benchmarks/hausdorff_benchmark.cpp index 1fb97db2e..6f59f042d 100644 --- a/cpp/benchmarks/hausdorff_benchmark.cpp +++ b/cpp/benchmarks/hausdorff_benchmark.cpp @@ -22,6 +22,8 @@ #include #include +#include + static void BM_hausdorff(benchmark::State& state) { int32_t num_spaces = state.range(0) - 1; diff --git a/cpp/include/cuspatial/experimental/type_utils.hpp b/cpp/include/cuspatial/experimental/type_utils.hpp index d270cf7ce..502b9218a 100644 --- a/cpp/include/cuspatial/experimental/type_utils.hpp +++ b/cpp/include/cuspatial/experimental/type_utils.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include diff --git a/cpp/src/indexing/construction/detail/phase_1.cuh b/cpp/src/indexing/construction/detail/phase_1.cuh index 0cd9fd6c9..54e4a98d7 100644 --- a/cpp/src/indexing/construction/detail/phase_1.cuh +++ b/cpp/src/indexing/construction/detail/phase_1.cuh @@ -28,9 +28,18 @@ #include #include +#include +#include +#include #include #include +#include #include +#include +#include +#include +#include +#include #include #include diff --git a/cpp/src/indexing/construction/detail/phase_2.cuh b/cpp/src/indexing/construction/detail/phase_2.cuh index 1a095582e..ee15c441b 100644 --- a/cpp/src/indexing/construction/detail/phase_2.cuh +++ b/cpp/src/indexing/construction/detail/phase_2.cuh @@ -26,9 +26,23 @@ #include #include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/cpp/src/indexing/construction/point_quadtree.cu b/cpp/src/indexing/construction/point_quadtree.cu index 67d7141a4..00fc30743 100644 --- a/cpp/src/indexing/construction/point_quadtree.cu +++ b/cpp/src/indexing/construction/point_quadtree.cu @@ -27,6 +27,16 @@ #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include + /* * quadtree indexing on points using the bottom-up algorithm described at ref. * http://www.adms-conf.org/2019-camera-ready/zhang_adms19.pdf diff --git a/cpp/src/interpolate/cubic_spline.cu b/cpp/src/interpolate/cubic_spline.cu index 80c59919a..5f3f411eb 100644 --- a/cpp/src/interpolate/cubic_spline.cu +++ b/cpp/src/interpolate/cubic_spline.cu @@ -28,6 +28,9 @@ #include +#include +#include + namespace { // anonymous // This functor performs one linear search for each input point in query_coords diff --git a/cpp/src/join/detail/intersection.cuh b/cpp/src/join/detail/intersection.cuh index f06a51d21..54513706a 100644 --- a/cpp/src/join/detail/intersection.cuh +++ b/cpp/src/join/detail/intersection.cuh @@ -27,9 +27,11 @@ #include #include +#include #include #include #include +#include #include #include diff --git a/cpp/src/join/detail/traversal.cuh b/cpp/src/join/detail/traversal.cuh index 8e2de9414..2acfb2e48 100644 --- a/cpp/src/join/detail/traversal.cuh +++ b/cpp/src/join/detail/traversal.cuh @@ -23,10 +23,16 @@ #include #include +#include +#include #include +#include +#include +#include #include #include #include +#include #include #include diff --git a/cpp/src/join/quadtree_point_in_polygon.cu b/cpp/src/join/quadtree_point_in_polygon.cu index 44c1de44b..3b35157a5 100644 --- a/cpp/src/join/quadtree_point_in_polygon.cu +++ b/cpp/src/join/quadtree_point_in_polygon.cu @@ -34,11 +34,14 @@ #include #include +#include #include #include #include #include +#include #include +#include namespace cuspatial { namespace detail { diff --git a/cpp/src/join/quadtree_point_to_nearest_polyline.cu b/cpp/src/join/quadtree_point_to_nearest_polyline.cu index 5d60fc1e4..48db02f32 100644 --- a/cpp/src/join/quadtree_point_to_nearest_polyline.cu +++ b/cpp/src/join/quadtree_point_to_nearest_polyline.cu @@ -33,11 +33,18 @@ #include #include +#include #include +#include +#include #include +#include #include #include #include +#include +#include +#include #include #include diff --git a/cpp/src/join/quadtree_poly_filtering.cu b/cpp/src/join/quadtree_poly_filtering.cu index ba0dfbc1d..a6be12036 100644 --- a/cpp/src/join/quadtree_poly_filtering.cu +++ b/cpp/src/join/quadtree_poly_filtering.cu @@ -29,7 +29,13 @@ #include #include +#include +#include +#include +#include +#include #include +#include #include diff --git a/cpp/src/spatial/hausdorff.cu b/cpp/src/spatial/hausdorff.cu index df9dd6bca..83106bb70 100644 --- a/cpp/src/spatial/hausdorff.cu +++ b/cpp/src/spatial/hausdorff.cu @@ -29,6 +29,8 @@ #include #include +#include +#include #include #include diff --git a/cpp/src/spatial/linestring_distance.cu b/cpp/src/spatial/linestring_distance.cu index 66a7cd81b..3e8e57eae 100644 --- a/cpp/src/spatial/linestring_distance.cu +++ b/cpp/src/spatial/linestring_distance.cu @@ -30,6 +30,9 @@ #include #include +#include +#include +#include #include #include diff --git a/cpp/src/spatial/lonlat_to_cartesian.cu b/cpp/src/spatial/lonlat_to_cartesian.cu index 1c44d5ab5..2b9d4693c 100644 --- a/cpp/src/spatial/lonlat_to_cartesian.cu +++ b/cpp/src/spatial/lonlat_to_cartesian.cu @@ -27,6 +27,11 @@ #include #include +#include +#include +#include +#include + #include #include diff --git a/cpp/src/spatial/polygon_bounding_box.cu b/cpp/src/spatial/polygon_bounding_box.cu index e647649da..e72f4a81a 100644 --- a/cpp/src/spatial/polygon_bounding_box.cu +++ b/cpp/src/spatial/polygon_bounding_box.cu @@ -30,10 +30,13 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include diff --git a/cpp/src/spatial/polyline_bounding_box.cu b/cpp/src/spatial/polyline_bounding_box.cu index 0435770ee..ce25d986d 100644 --- a/cpp/src/spatial/polyline_bounding_box.cu +++ b/cpp/src/spatial/polyline_bounding_box.cu @@ -28,10 +28,13 @@ #include #include #include +#include #include #include #include #include +#include +#include #include #include diff --git a/cpp/src/trajectory/derive_trajectories.cu b/cpp/src/trajectory/derive_trajectories.cu index 4634aadcc..c7e7a47a6 100644 --- a/cpp/src/trajectory/derive_trajectories.cu +++ b/cpp/src/trajectory/derive_trajectories.cu @@ -26,8 +26,11 @@ #include #include +#include #include #include +#include +#include #include #include diff --git a/cpp/src/trajectory/trajectory_bounding_boxes.cu b/cpp/src/trajectory/trajectory_bounding_boxes.cu index 467fbf1bf..aa4d0f8c9 100644 --- a/cpp/src/trajectory/trajectory_bounding_boxes.cu +++ b/cpp/src/trajectory/trajectory_bounding_boxes.cu @@ -29,7 +29,12 @@ #include #include +#include +#include #include +#include +#include +#include namespace cuspatial { diff --git a/cpp/src/trajectory/trajectory_distances_and_speeds.cu b/cpp/src/trajectory/trajectory_distances_and_speeds.cu index 509b713bf..ba9badc1c 100644 --- a/cpp/src/trajectory/trajectory_distances_and_speeds.cu +++ b/cpp/src/trajectory/trajectory_distances_and_speeds.cu @@ -29,7 +29,14 @@ #include #include +#include +#include +#include #include +#include +#include +#include +#include namespace cuspatial { diff --git a/cpp/src/utility/scatter_output_iterator.cuh b/cpp/src/utility/scatter_output_iterator.cuh index 8507f3ac6..74be541d0 100644 --- a/cpp/src/utility/scatter_output_iterator.cuh +++ b/cpp/src/utility/scatter_output_iterator.cuh @@ -14,8 +14,11 @@ * limitations under the License. */ +#include #include +#include #include +#include #pragma once diff --git a/cpp/tests/join/point_in_polygon_test_large.cpp b/cpp/tests/join/point_in_polygon_test_large.cpp index f93d4e0c5..dbf579703 100644 --- a/cpp/tests/join/point_in_polygon_test_large.cpp +++ b/cpp/tests/join/point_in_polygon_test_large.cpp @@ -33,7 +33,10 @@ #include #include +#include +#include #include +#include #include #include diff --git a/cpp/tests/spatial/hausdorff_test.cpp b/cpp/tests/spatial/hausdorff_test.cpp index 07dbbf410..ca8f5a6a3 100644 --- a/cpp/tests/spatial/hausdorff_test.cpp +++ b/cpp/tests/spatial/hausdorff_test.cpp @@ -26,6 +26,7 @@ #include #include +#include #include diff --git a/cpp/tests/spatial/point_in_polygon_test.cpp b/cpp/tests/spatial/point_in_polygon_test.cpp index 4c3680959..952f5a5e0 100644 --- a/cpp/tests/spatial/point_in_polygon_test.cpp +++ b/cpp/tests/spatial/point_in_polygon_test.cpp @@ -23,6 +23,9 @@ #include #include +#include +#include + #include using namespace cudf::test; diff --git a/cpp/tests/trajectory/test_trajectory_distances_and_speeds.cu b/cpp/tests/trajectory/test_trajectory_distances_and_speeds.cu index b0df57b66..2e6d9e408 100644 --- a/cpp/tests/trajectory/test_trajectory_distances_and_speeds.cu +++ b/cpp/tests/trajectory/test_trajectory_distances_and_speeds.cu @@ -19,6 +19,8 @@ #include #include +#include + #include template