Skip to content

Commit

Permalink
Add missing thrust includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice committed May 25, 2022
1 parent e229c52 commit ff9b886
Show file tree
Hide file tree
Showing 34 changed files with 105 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpp/include/raft/cluster/detail/kmeans.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,19 @@

#include <cuda.h>
#include <thrust/binary_search.h>
#include <thrust/device_ptr.h>
#include <thrust/fill.h>
#include <thrust/find.h>
#include <thrust/functional.h>
#include <thrust/gather.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/memory.h>
#include <thrust/random.h>
#include <thrust/reduce.h>
#include <thrust/scan.h>
#include <thrust/sequence.h>
#include <thrust/sort.h>
#include <thrust/transform.h>

#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
Expand Down
1 change: 1 addition & 0 deletions cpp/include/raft/core/span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <cinttypes> // size_t
#include <cstddef> // std::byte
#include <raft/detail/span.hpp>
#include <thrust/distance.h>
#include <thrust/functional.h>
#include <thrust/host_vector.h> // __host__ __device__
#include <thrust/iterator/reverse_iterator.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/lap/detail/lap_functions.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>

#include <thrust/execution_policy.h>
#include <thrust/fill.h>
#include <thrust/reduce.h>
#include <thrust/scan.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/include/raft/lap/detail/lap_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <raft/cudart_utils.h>
#include <raft/handle.hpp>

#include <thrust/execution_policy.h>
#include <thrust/for_each.h>

#include <cstddef>
Expand Down
3 changes: 3 additions & 0 deletions cpp/include/raft/lap/lap.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <raft/handle.hpp>
#include <rmm/device_uvector.hpp>

#include <thrust/execution_policy.h>
#include <thrust/fill.h>

#include "detail/d_structs.h"
#include "detail/lap_functions.cuh"

Expand Down
3 changes: 3 additions & 0 deletions cpp/include/raft/lap/lap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#include <raft/handle.hpp>
#include <rmm/device_uvector.hpp>

#include <thrust/execution_policy.h>
#include <thrust/fill.h>

#include "detail/d_structs.h"
#include "detail/lap_functions.cuh"

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/add.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <raft/linalg/binary_op.cuh>
#include <raft/linalg/unary_op.cuh>

#include <thrust/functional.h>

namespace raft {
namespace linalg {
namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/eltwise.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include <raft/linalg/binary_op.cuh>
#include <raft/linalg/unary_op.cuh>

#include <thrust/functional.h>

namespace raft {
namespace linalg {
namespace detail {
Expand Down
1 change: 1 addition & 0 deletions cpp/include/raft/matrix/detail/matrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <rmm/exec_policy.hpp>

#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>

#include <algorithm>
#include <cstddef>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@

#include <rmm/device_uvector.hpp>

#include <thrust/scan.h>
#include <thrust/transform.h>

namespace raft {
namespace sparse {
namespace distance {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

#include <cuco/static_map.cuh>

#include <thrust/copy.h>
#include <thrust/iterator/counting_iterator.h>

// this is needed by cuco as key, value must be bitwise comparable.
// compilers don't declare float/double as bitwise comparable
// but that is too strict
Expand Down
3 changes: 3 additions & 0 deletions cpp/include/raft/sparse/distance/detail/l2_distance.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

#include <nvfunctional>

#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>

#include <algorithm>

namespace raft {
Expand Down
7 changes: 7 additions & 0 deletions cpp/include/raft/sparse/hierarchy/detail/agglomerative.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@

#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
#include <thrust/extrema.h>
#include <thrust/fill.h>
#include <thrust/for_each.h>
#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/sort.h>
#include <thrust/tuple.h>

#include <cstddef>

Expand Down
4 changes: 4 additions & 0 deletions cpp/include/raft/sparse/hierarchy/detail/connectivities.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#include <raft/sparse/hierarchy/common.h>
#include <raft/sparse/selection/knn_graph.cuh>

#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform.h>
#include <thrust/tuple.h>

#include <limits>

namespace raft {
Expand Down
8 changes: 8 additions & 0 deletions cpp/include/raft/sparse/mst/detail/mst_solver_inl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@
#include <rmm/device_uvector.hpp>

#include <iostream>
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/host_vector.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/reduce.h>
#include <thrust/sequence.h>
#include <thrust/sort.h>
#include <thrust/transform.h>
#include <thrust/transform_reduce.h>
#include <thrust/tuple.h>
#include <thrust/unique.h>

namespace raft {
namespace mst {
Expand Down
1 change: 1 addition & 0 deletions cpp/include/raft/sparse/op/detail/filter.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <rmm/exec_policy.hpp>

#include <thrust/device_ptr.h>
#include <thrust/reduce.h>
#include <thrust/scan.h>

#include <cuda_runtime.h>
Expand Down
3 changes: 3 additions & 0 deletions cpp/include/raft/sparse/op/detail/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
#include <rmm/exec_policy.hpp>

#include <thrust/device_ptr.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/scan.h>
#include <thrust/sort.h>
#include <thrust/tuple.h>

#include <cusparse_v2.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@

#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/scan.h>
#include <thrust/sort.h>
#include <thrust/transform.h>
#include <thrust/tuple.h>

#include <cub/cub.cuh>

Expand Down
5 changes: 5 additions & 0 deletions cpp/include/raft/spatial/knn/detail/ball_cover.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@
#include <faiss/gpu/utils/Select.cuh>
#include <faiss/utils/Heap.h>

#include <thrust/fill.h>
#include <thrust/for_each.h>
#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/reduce.h>
#include <thrust/sequence.h>
#include <thrust/sort.h>
#include <thrust/tuple.h>

namespace raft {
namespace spatial {
Expand Down
1 change: 1 addition & 0 deletions cpp/include/raft/spatial/knn/detail/ball_cover/common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "../haversine_distance.cuh"
#include <cstdint>
#include <thrust/functional.h>
#include <thrust/tuple.h>

namespace raft {
namespace spatial {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/spatial/knn/detail/ball_cover/registers.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <faiss/gpu/utils/Select.cuh>
#include <faiss/utils/Heap.h>

#include <thrust/fill.h>

namespace raft {
namespace spatial {
namespace knn {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/spectral/detail/matrix_wrappers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
#include <raft/sparse/detail/cusparse_wrappers.h>
#include <rmm/device_uvector.hpp>

#include <thrust/execution_policy.h>
#include <thrust/fill.h>
#include <thrust/reduce.h>
#include <thrust/system/cuda/execution_policy.h>

#include <algorithm>

Expand Down
6 changes: 6 additions & 0 deletions cpp/include/raft/spectral/detail/spectral_util.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,15 @@
#include <raft/linalg/detail/cublas_wrappers.hpp>
#include <raft/spectral/matrix_wrappers.hpp>

#include <thrust/device_ptr.h>
#include <thrust/fill.h>
#include <thrust/for_each.h>
#include <thrust/functional.h>
#include <thrust/iterator/constant_iterator.h>
#include <thrust/iterator/zip_iterator.h>
#include <thrust/reduce.h>
#include <thrust/transform.h>
#include <thrust/tuple.h>

#include <algorithm>

Expand Down
4 changes: 4 additions & 0 deletions cpp/include/raft/stats/detail/adjusted_rand_index.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>

#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
#include <thrust/extrema.h>

namespace raft {
namespace stats {
namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/stats/detail/batched/silhouette_score.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/device_vector.h>
#include <thrust/fill.h>
#include <thrust/reduce.h>

namespace raft {
namespace stats {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/stats/detail/contingencyMatrix.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <raft/cudart_utils.h>

#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
#include <thrust/extrema.h>
#include <thrust/reduce.h>

#include <cub/cub.cuh>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/stats/detail/scores.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#include <raft/stats/mean.cuh>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#include <thrust/count.h>
#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
#include <thrust/reduce.h>

#define N_THREADS 512
Expand Down
1 change: 1 addition & 0 deletions cpp/test/linalg/reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <rmm/device_uvector.hpp>

#include <thrust/device_ptr.h>
#include <thrust/memory.h>

namespace raft {
namespace linalg {
Expand Down
4 changes: 4 additions & 0 deletions cpp/test/matrix/matrix.cu
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
#include <raft/random/rng.cuh>
#include <rmm/device_uvector.hpp>

#include <thrust/copy.h>
#include <thrust/device_ptr.h>
#include <thrust/iterator/counting_iterator.h>

namespace raft {
namespace matrix {

Expand Down
2 changes: 2 additions & 0 deletions cpp/test/mdarray.cu
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#include <rmm/device_vector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
#include <thrust/for_each.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/sequence.h>

namespace {
namespace stdex = std::experimental;
Expand Down
4 changes: 4 additions & 0 deletions cpp/test/mst.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@

#include <bits/stdc++.h>

#include <thrust/execution_policy.h>
#include <thrust/memory.h>
#include <thrust/reduce.h>

#include <cstddef>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions cpp/test/random/make_regression.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <gtest/gtest.h>
#include <thrust/count.h>
#include <thrust/device_ptr.h>
#include <thrust/device_vector.h>

#include "../test_utils.h"
Expand Down
5 changes: 5 additions & 0 deletions cpp/test/span.cu
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
#include <raft/cuda_utils.cuh>
#include <raft/cudart_utils.h>
#include <raft/span.hpp>
#include <thrust/copy.h>
#include <thrust/device_vector.h>
#include <thrust/execution_policy.h>
#include <thrust/for_each.h>
#include <thrust/host_vector.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/memory.h>

namespace raft {
struct TestStatus {
Expand Down
2 changes: 2 additions & 0 deletions cpp/test/spatial/ball_cover.cu
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>
#include <thrust/count.h>
#include <thrust/fill.h>
#include <thrust/transform.h>

#include <cstdint>
Expand Down

0 comments on commit ff9b886

Please sign in to comment.