Relax iter_swap's first parameter from tag to execution policy reference
GitHub
Bug
Bug
git-commit
git-author Jared Hoberock
Jobs:
[git-p4: depot-paths = "//sw/gpgpu/thrust/": change = 24246593]
MODIFY
thrust/system/cuda/detail/iter_swap.h
thrust/system/cuda/detail/iter_swap.h
#include <thrust/system/cuda/config.h>
#include <thrust/detail/raw_pointer_cast.h>
+#include <thrust/system/cuda/detail/execution_policy.h>
#include <thrust/swap.h>
BEGIN_NS_THRUST
namespace cuda_cub {
-template<typename Pointer1, typename Pointer2>
+template<typename DerivedPolicy, typename Pointer1, typename Pointer2>
inline __host__ __device__
-void iter_swap(tag, Pointer1 a, Pointer2 b)
+void iter_swap(thrust::cuda::execution_policy<DerivedPolicy> &, Pointer1 a, Pointer2 b)
{
// XXX war nvbugs/881631
struct war_nvbugs_881631

MODIFY
thrust/system/detail/generic/memory.h
thrust/system/detail/generic/memory.h
@@ -59,9 +59,9 @@ template<typename DerivedPolicy, typename Pointer>
__host__ __device__
void get_value(thrust::execution_policy<DerivedPolicy> &, Pointer);
-template<typename Pointer1, typename Pointer2>
+template<typename DerivedPolicy, typename Pointer1, typename Pointer2>
__host__ __device__
-void iter_swap(tag, Pointer1, Pointer2);
+void iter_swap(thrust::execution_policy<DerivedPolicy>&, Pointer1, Pointer2);
} // end generic
} // end detail

MODIFY
thrust/system/detail/generic/memory.inl
thrust/system/detail/generic/memory.inl
@@ -79,9 +79,9 @@ void get_value(thrust::execution_policy<DerivedPolicy> &, Pointer)
}
-template<typename Pointer1, typename Pointer2>
+template<typename DerivedPolicy, typename Pointer1, typename Pointer2>
__host__ __device__
-void iter_swap(tag, Pointer1, Pointer2)
+void iter_swap(thrust::execution_policy<DerivedPolicy> &, Pointer1, Pointer2)
{
// unimplemented
THRUST_STATIC_ASSERT( (thrust::detail::depend_on_instantiation<Pointer1, false>::value) );

MODIFY
thrust/system/detail/sequential/iter_swap.h
thrust/system/detail/sequential/iter_swap.h
@@ -31,9 +31,9 @@ namespace sequential
{
-template<typename Pointer1, typename Pointer2>
+template<typename DerivedPolicy, typename Pointer1, typename Pointer2>
__host__ __device__
- void iter_swap(tag, Pointer1 a, Pointer2 b)
+ void iter_swap(sequential::execution_policy<DerivedPolicy> &, Pointer1 a, Pointer2 b)
{
using thrust::swap;
swap(*thrust::raw_pointer_cast(a), *thrust::raw_pointer_cast(b));

Relax iter_swap's first parameter from tag to execution policy reference
GitHub #855
Bug 1865408
Bug 2004663
git-commit c161abb11d6b9cce31039a858d32782b81cdeeb1
git-author Jared Hoberock <jaredhoberock@gmail.com>

Jobs: 1865408-2006 2004663-2006
[git-p4: depot-paths = "//sw/gpgpu/thrust/": change = 24246593]