Skip to content

Commit f1817d8

Browse files
bdiceisVoid
authored andcommitted
Add missing Thrust includes (rapidsai#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 (rapidsai/rapids-cmake#199). ## Context Version 1.16 of Thrust reduced the number of internal header inclusions: > [rapidsai#1572](NVIDIA/thrust#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: rapidsai#539
1 parent 5add705 commit f1817d8

24 files changed

+106
-0
lines changed

cpp/benchmarks/hausdorff_benchmark.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <cudf/detail/iterator.cuh>
2323
#include <cudf_test/column_wrapper.hpp>
2424

25+
#include <thrust/iterator/constant_iterator.h>
26+
2527
static void BM_hausdorff(benchmark::State& state)
2628
{
2729
int32_t num_spaces = state.range(0) - 1;

cpp/include/cuspatial/experimental/type_utils.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <thrust/iterator/transform_iterator.h>
1818
#include <thrust/iterator/transform_output_iterator.h>
1919
#include <thrust/iterator/zip_iterator.h>
20+
#include <thrust/tuple.h>
2021

2122
#include <type_traits>
2223

cpp/src/indexing/construction/detail/phase_1.cuh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@
2828
#include <rmm/device_uvector.hpp>
2929
#include <rmm/exec_policy.hpp>
3030

31+
#include <thrust/copy.h>
32+
#include <thrust/distance.h>
33+
#include <thrust/fill.h>
3134
#include <thrust/functional.h>
3235
#include <thrust/iterator/constant_iterator.h>
36+
#include <thrust/iterator/transform_iterator.h>
3337
#include <thrust/iterator/zip_iterator.h>
38+
#include <thrust/reduce.h>
39+
#include <thrust/sequence.h>
40+
#include <thrust/sort.h>
41+
#include <thrust/transform.h>
42+
#include <thrust/tuple.h>
3443

3544
#include <memory>
3645
#include <tuple>

cpp/src/indexing/construction/detail/phase_2.cuh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,23 @@
2626
#include <rmm/device_uvector.hpp>
2727
#include <rmm/exec_policy.hpp>
2828

29+
#include <thrust/copy.h>
30+
#include <thrust/count.h>
31+
#include <thrust/distance.h>
32+
#include <thrust/fill.h>
2933
#include <thrust/functional.h>
3034
#include <thrust/iterator/counting_iterator.h>
3135
#include <thrust/iterator/permutation_iterator.h>
36+
#include <thrust/iterator/zip_iterator.h>
37+
#include <thrust/remove.h>
38+
#include <thrust/replace.h>
39+
#include <thrust/scan.h>
40+
#include <thrust/scatter.h>
41+
#include <thrust/sequence.h>
42+
#include <thrust/sort.h>
43+
#include <thrust/transform.h>
44+
#include <thrust/tuple.h>
45+
#include <thrust/uninitialized_fill.h>
3246

3347
#include <memory>
3448
#include <tuple>

cpp/src/indexing/construction/point_quadtree.cu

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,16 @@
2727
#include <rmm/device_uvector.hpp>
2828
#include <rmm/exec_policy.hpp>
2929

30+
#include <thrust/copy.h>
31+
#include <thrust/fill.h>
32+
#include <thrust/functional.h>
33+
#include <thrust/iterator/zip_iterator.h>
34+
#include <thrust/reduce.h>
35+
#include <thrust/replace.h>
36+
#include <thrust/scan.h>
37+
#include <thrust/transform.h>
38+
#include <thrust/tuple.h>
39+
3040
/*
3141
* quadtree indexing on points using the bottom-up algorithm described at ref.
3242
* http://www.adms-conf.org/2019-camera-ready/zhang_adms19.pdf

cpp/src/interpolate/cubic_spline.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828

2929
#include <cusparse.h>
3030

31+
#include <thrust/for_each.h>
32+
#include <thrust/iterator/counting_iterator.h>
33+
3134
namespace { // anonymous
3235

3336
// This functor performs one linear search for each input point in query_coords

cpp/src/join/detail/intersection.cuh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
#include <rmm/exec_policy.hpp>
2828

2929
#include <thrust/copy.h>
30+
#include <thrust/distance.h>
3031
#include <thrust/iterator/transform_iterator.h>
3132
#include <thrust/iterator/zip_iterator.h>
3233
#include <thrust/remove.h>
34+
#include <thrust/transform.h>
3335
#include <thrust/tuple.h>
3436

3537
#include <utility>

cpp/src/join/detail/traversal.cuh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,16 @@
2323
#include <rmm/device_uvector.hpp>
2424
#include <rmm/exec_policy.hpp>
2525

26+
#include <thrust/fill.h>
27+
#include <thrust/functional.h>
2628
#include <thrust/gather.h>
29+
#include <thrust/iterator/constant_iterator.h>
30+
#include <thrust/iterator/counting_iterator.h>
31+
#include <thrust/iterator/permutation_iterator.h>
2732
#include <thrust/iterator/zip_iterator.h>
2833
#include <thrust/scan.h>
2934
#include <thrust/scatter.h>
35+
#include <thrust/transform.h>
3036
#include <thrust/tuple.h>
3137

3238
#include <tuple>

cpp/src/join/quadtree_point_in_polygon.cu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@
3434

3535
#include <thrust/binary_search.h>
3636
#include <thrust/copy.h>
37+
#include <thrust/distance.h>
3738
#include <thrust/iterator/counting_iterator.h>
3839
#include <thrust/iterator/permutation_iterator.h>
3940
#include <thrust/iterator/zip_iterator.h>
4041
#include <thrust/remove.h>
42+
#include <thrust/scan.h>
4143
#include <thrust/transform.h>
44+
#include <thrust/tuple.h>
4245

4346
namespace cuspatial {
4447
namespace detail {

cpp/src/join/quadtree_point_to_nearest_polyline.cu

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,18 @@
3333
#include <rmm/exec_policy.hpp>
3434

3535
#include <thrust/binary_search.h>
36+
#include <thrust/distance.h>
3637
#include <thrust/fill.h>
38+
#include <thrust/functional.h>
39+
#include <thrust/iterator/counting_iterator.h>
3740
#include <thrust/iterator/discard_iterator.h>
41+
#include <thrust/iterator/permutation_iterator.h>
3842
#include <thrust/iterator/transform_iterator.h>
3943
#include <thrust/iterator/zip_iterator.h>
4044
#include <thrust/reduce.h>
45+
#include <thrust/scan.h>
46+
#include <thrust/scatter.h>
47+
#include <thrust/tuple.h>
4148

4249
#include <limits>
4350
#include <memory>

0 commit comments

Comments
 (0)