2626#include < rmm/device_uvector.hpp>
2727#include < rmm/exec_policy.hpp>
2828
29+ #include < cuda/std/iterator>
2930#include < cuda/std/optional>
3031#include < thrust/binary_search.h>
31- #include < thrust/distance.h>
3232#include < thrust/execution_policy.h>
3333#include < thrust/transform.h>
3434#include < thrust/transform_reduce.h>
@@ -52,7 +52,7 @@ __device__ cuda::std::optional<vertex_t> major_hypersparse_idx_from_major_nochec
5252 thrust::lower_bound (thrust::seq, dcs_nzd_vertices.begin (), dcs_nzd_vertices.end (), major);
5353 return it != dcs_nzd_vertices.end ()
5454 ? (*it == major ? cuda::std::optional<vertex_t >{static_cast <vertex_t >(
55- thrust ::distance (dcs_nzd_vertices.begin (), it))}
55+ cuda::std ::distance (dcs_nzd_vertices.begin (), it))}
5656 : cuda::std::nullopt )
5757 : cuda::std::nullopt ;
5858}
@@ -161,7 +161,7 @@ class edge_partition_device_view_base_t {
161161
162162 __device__ vertex_t major_idx_from_local_edge_idx_nocheck (edge_t local_edge_idx) const noexcept
163163 {
164- return static_cast <vertex_t >(thrust ::distance (
164+ return static_cast <vertex_t >(cuda::std ::distance (
165165 offsets_.begin () + 1 ,
166166 thrust::upper_bound (thrust::seq, offsets_.begin () + 1 , offsets_.end (), local_edge_idx)));
167167 }
@@ -219,7 +219,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
219219 MajorIterator major_last,
220220 rmm::cuda_stream_view stream) const
221221 {
222- if (thrust ::distance (major_first, major_last) == 0 ) return size_t {0 };
222+ if (cuda::std ::distance (major_first, major_last) == 0 ) return size_t {0 };
223223 return dcs_nzd_vertices_ ? thrust::transform_reduce (
224224 rmm::exec_policy (stream),
225225 major_first,
@@ -258,7 +258,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
258258 raft::device_span<size_t > count /* size = 1 */ ,
259259 rmm::cuda_stream_view stream) const
260260 {
261- if (thrust ::distance (major_first, major_last) == 0 ) {
261+ if (cuda::std ::distance (major_first, major_last) == 0 ) {
262262 RAFT_CUDA_TRY (cudaMemsetAsync (count.data (), 0 , sizeof (size_t ), stream));
263263 }
264264
@@ -278,14 +278,14 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
278278 tmp_storage_bytes,
279279 local_degree_first,
280280 count.data (),
281- thrust ::distance (major_first, major_last),
281+ cuda::std ::distance (major_first, major_last),
282282 stream);
283283 d_tmp_storage.resize (tmp_storage_bytes, stream);
284284 cub::DeviceReduce::Sum (d_tmp_storage.data (),
285285 tmp_storage_bytes,
286286 local_degree_first,
287287 count.data (),
288- thrust ::distance (major_first, major_last),
288+ cuda::std ::distance (major_first, major_last),
289289 stream);
290290 } else {
291291 auto local_degree_first = thrust::make_transform_iterator (
@@ -300,14 +300,14 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
300300 tmp_storage_bytes,
301301 local_degree_first,
302302 count.data (),
303- thrust ::distance (major_first, major_last),
303+ cuda::std ::distance (major_first, major_last),
304304 stream);
305305 d_tmp_storage.resize (tmp_storage_bytes, stream);
306306 cub::DeviceReduce::Sum (d_tmp_storage.data (),
307307 tmp_storage_bytes,
308308 local_degree_first,
309309 count.data (),
310- thrust ::distance (major_first, major_last),
310+ cuda::std ::distance (major_first, major_last),
311311 stream);
312312 }
313313 }
@@ -343,7 +343,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
343343 MajorIterator major_last,
344344 rmm::cuda_stream_view stream) const
345345 {
346- rmm::device_uvector<edge_t > local_degrees (thrust ::distance (major_first, major_last), stream);
346+ rmm::device_uvector<edge_t > local_degrees (cuda::std ::distance (major_first, major_last), stream);
347347 if (dcs_nzd_vertices_) {
348348 assert (major_hypersparse_first_);
349349 thrust::transform (rmm::exec_policy_nosync (stream),
@@ -373,7 +373,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
373373 MajorIterator major_last,
374374 rmm::cuda_stream_view stream) const
375375 {
376- if (thrust ::distance (major_first, major_last) == 0 ) return size_t {0 };
376+ if (cuda::std ::distance (major_first, major_last) == 0 ) return size_t {0 };
377377 return dcs_nzd_vertices_ ? thrust::transform_reduce (
378378 rmm::exec_policy (stream),
379379 major_first,
@@ -453,7 +453,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
453453 MajorIterator major_last,
454454 rmm::cuda_stream_view stream) const
455455 {
456- rmm::device_uvector<edge_t > local_degrees (thrust ::distance (major_first, major_last), stream);
456+ rmm::device_uvector<edge_t > local_degrees (cuda::std ::distance (major_first, major_last), stream);
457457 if (dcs_nzd_vertices_) {
458458 assert (major_hypersparse_first_);
459459 thrust::transform (
@@ -634,7 +634,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
634634 MajorIterator major_last,
635635 rmm::cuda_stream_view stream) const
636636 {
637- if (thrust ::distance (major_first, major_last) == 0 ) return size_t {0 };
637+ if (cuda::std ::distance (major_first, major_last) == 0 ) return size_t {0 };
638638 return thrust::transform_reduce (
639639 rmm::exec_policy (stream),
640640 major_first,
@@ -657,7 +657,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
657657 raft::device_span<size_t > count /* size = 1 */ ,
658658 rmm::cuda_stream_view stream) const
659659 {
660- if (thrust ::distance (major_first, major_last) == 0 ) {
660+ if (cuda::std ::distance (major_first, major_last) == 0 ) {
661661 RAFT_CUDA_TRY (cudaMemsetAsync (count.data (), 0 , sizeof (size_t ), stream));
662662 }
663663
@@ -678,14 +678,14 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
678678 tmp_storage_bytes,
679679 local_degree_first,
680680 count.data (),
681- thrust ::distance (major_first, major_last),
681+ cuda::std ::distance (major_first, major_last),
682682 stream);
683683 d_tmp_storage.resize (tmp_storage_bytes, stream);
684684 cub::DeviceReduce::Sum (d_tmp_storage.data (),
685685 tmp_storage_bytes,
686686 local_degree_first,
687687 count.data (),
688- thrust ::distance (major_first, major_last),
688+ cuda::std ::distance (major_first, major_last),
689689 stream);
690690 }
691691
@@ -709,7 +709,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
709709 MajorIterator major_last,
710710 rmm::cuda_stream_view stream) const
711711 {
712- rmm::device_uvector<edge_t > local_degrees (thrust ::distance (major_first, major_last), stream);
712+ rmm::device_uvector<edge_t > local_degrees (cuda::std ::distance (major_first, major_last), stream);
713713 thrust::transform (rmm::exec_policy_nosync (stream),
714714 major_first,
715715 major_last,
@@ -728,7 +728,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
728728 MajorIterator major_last,
729729 rmm::cuda_stream_view stream) const
730730 {
731- if (thrust ::distance (major_first, major_last) == 0 ) return size_t {0 };
731+ if (cuda::std ::distance (major_first, major_last) == 0 ) return size_t {0 };
732732 return thrust::transform_reduce (
733733 rmm::exec_policy (stream),
734734 major_first,
@@ -774,7 +774,7 @@ class edge_partition_device_view_t<vertex_t, edge_t, multi_gpu, std::enable_if_t
774774 MajorIterator major_last,
775775 rmm::cuda_stream_view stream) const
776776 {
777- rmm::device_uvector<edge_t > local_degrees (thrust ::distance (major_first, major_last), stream);
777+ rmm::device_uvector<edge_t > local_degrees (cuda::std ::distance (major_first, major_last), stream);
778778 thrust::transform (
779779 rmm::exec_policy_nosync (stream),
780780 major_first,
0 commit comments