diff --git a/projects/rocthrust/CHANGELOG.md b/projects/rocthrust/CHANGELOG.md index f339eb9d2f08..b468ec1cc485 100644 --- a/projects/rocthrust/CHANGELOG.md +++ b/projects/rocthrust/CHANGELOG.md @@ -20,6 +20,10 @@ Documentation for rocThrust available at * `thrust::device_malloc_allocator` is deprecated as of this version. It will be removed in an upcoming version. +### Resolved issues + +* Fixed an issue with internal calls to unqualified `distance()` which would be ambigious due to also visibile implementation through ADL. + ## rocThrust 3.4.0 for ROCm 6.5 ### Added diff --git a/projects/rocthrust/thrust/system/hip/detail/async/copy.h b/projects/rocthrust/thrust/system/hip/detail/async/copy.h index ad87fc6dd7c6..662168622c96 100644 --- a/projects/rocthrust/thrust/system/hip/detail/async/copy.h +++ b/projects/rocthrust/thrust/system/hip/detail/async/copy.h @@ -329,7 +329,8 @@ auto async_copy(thrust::hip::execution_policy& from_exec, ForwardIt first, Sentinel last, OutputIt output) - THRUST_RETURNS(thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, distance(first, last), output)) + THRUST_RETURNS( + thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, thrust::distance(first, last), output)) // ADL entry point. template @@ -338,7 +339,8 @@ auto async_copy(thrust::hip::execution_policy& from_exec, ForwardIt first, Sentinel last, OutputIt output) - THRUST_RETURNS(thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, distance(first, last), output)) + THRUST_RETURNS( + thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, thrust::distance(first, last), output)) // ADL entry point. template @@ -347,7 +349,8 @@ auto async_copy(thrust::hip::execution_policy& from_exec, ForwardIt first, Sentinel last, OutputIt output) - THRUST_RETURNS(thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, distance(first, last), output)) + THRUST_RETURNS( + thrust::system::hip::detail::async_copy_n(from_exec, to_exec, first, thrust::distance(first, last), output)) } // namespace hip_rocprim diff --git a/projects/rocthrust/thrust/system/hip/detail/async/exclusive_scan.h b/projects/rocthrust/thrust/system/hip/detail/async/exclusive_scan.h index 47204a8d220b..be8c6c46188d 100644 --- a/projects/rocthrust/thrust/system/hip/detail/async/exclusive_scan.h +++ b/projects/rocthrust/thrust/system/hip/detail/async/exclusive_scan.h @@ -130,7 +130,7 @@ auto async_exclusive_scan( InitialValueType&& init, BinaryOp&& op) THRUST_RETURNS(thrust::system::hip::detail::async_exclusive_scan_n( - policy, first, distance(first, THRUST_FWD(last)), THRUST_FWD(out), THRUST_FWD(init), THRUST_FWD(op))) + policy, first, thrust::distance(first, THRUST_FWD(last)), THRUST_FWD(out), THRUST_FWD(init), THRUST_FWD(op))) } // namespace hip_rocprim diff --git a/projects/rocthrust/thrust/system/hip/detail/async/for_each.h b/projects/rocthrust/thrust/system/hip/detail/async/for_each.h index ceaa6189ed54..750fa45d59d2 100644 --- a/projects/rocthrust/thrust/system/hip/detail/async/for_each.h +++ b/projects/rocthrust/thrust/system/hip/detail/async/for_each.h @@ -118,7 +118,8 @@ namespace hip_rocprim // ADL entry point. template auto async_for_each(execution_policy& policy, ForwardIt first, Sentinel last, UnaryFunction&& func) - THRUST_RETURNS(thrust::system::hip::detail::async_for_each_n(policy, first, distance(first, last), THRUST_FWD(func))); + THRUST_RETURNS( + thrust::system::hip::detail::async_for_each_n(policy, first, thrust::distance(first, last), THRUST_FWD(func))); } // namespace hip_rocprim diff --git a/projects/rocthrust/thrust/system/hip/detail/async/inclusive_scan.h b/projects/rocthrust/thrust/system/hip/detail/async/inclusive_scan.h index 6d8e2aa0767c..4d805474bc31 100644 --- a/projects/rocthrust/thrust/system/hip/detail/async/inclusive_scan.h +++ b/projects/rocthrust/thrust/system/hip/detail/async/inclusive_scan.h @@ -188,7 +188,7 @@ template & policy, ForwardIt first, Sentinel&& last, OutputIt&& out, BinaryOp&& op) THRUST_RETURNS(thrust::system::hip::detail::async_inclusive_scan_n( - policy, first, distance(first, THRUST_FWD(last)), THRUST_FWD(out), THRUST_FWD(op))) + policy, first, thrust::distance(first, THRUST_FWD(last)), THRUST_FWD(out), THRUST_FWD(op))) // ADL entry point. template auto async_reduce(execution_policy& policy, ForwardIt first, Sentinel last, T init, BinaryOp op) - THRUST_RETURNS(thrust::system::hip::detail::async_reduce_n(policy, first, distance(first, last), init, op)) + THRUST_RETURNS(thrust::system::hip::detail::async_reduce_n(policy, first, thrust::distance(first, last), init, op)) } // namespace hip_rocprim /////////////////////////////////////////////////////////////////////////////// @@ -228,7 +228,7 @@ template & policy, ForwardIt first, Sentinel last, OutputIt output, T init, BinaryOp op) THRUST_RETURNS( - thrust::system::hip::detail::async_reduce_into_n(policy, first, distance(first, last), output, init, op)) + thrust::system::hip::detail::async_reduce_into_n(policy, first, thrust::distance(first, last), output, init, op)) } // namespace hip_rocprim