Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Qualify calls to make_reverse_iterator
Browse files Browse the repository at this point in the history
Unqualified calls to make_reverse_iterator would result in ADL ambiguities
between std::make_reverse_iterator and thrust::make_reverse_iterator when
the iterator argument is a std::vector<T>::iterator or other "std" type.
Fix the problem and avoid ADL by changing the call to the qualified name
thrust::make_reverse_iterator.
  • Loading branch information
dkolsen-pgi committed Dec 2, 2020
1 parent bdedc53 commit 4604e85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions thrust/system/cuda/detail/reverse.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ reverse_copy(execution_policy<Derived> &policy,
ResultIt result)
{
return cuda_cub::copy(policy,
make_reverse_iterator(last),
make_reverse_iterator(first),
thrust::make_reverse_iterator(last),
thrust::make_reverse_iterator(first),
result);
}

Expand All @@ -89,7 +89,7 @@ reverse(execution_policy<Derived> &policy,
ItemsIt mid(first);
thrust::advance(mid, N / 2);

cuda_cub::swap_ranges(policy, first, mid, make_reverse_iterator(last));
cuda_cub::swap_ranges(policy, first, mid, thrust::make_reverse_iterator(last));
}


Expand Down

0 comments on commit 4604e85

Please sign in to comment.