 #include <thrust/execution_policy.h>
 
 
-template<typename Iterator, typename Predicate, typename Iterator2>
+template<typename ExecutionPolicy, typename Iterator, typename Predicate, typename Iterator2>
 __global__
-void is_partitioned_kernel(Iterator first, Iterator last, Predicate pred, Iterator2 result)
+void is_partitioned_kernel(ExecutionPolicy exec, Iterator first, Iterator last, Predicate pred, Iterator2 result)
 {
-  *result = thrust::is_partitioned(thrust::seq, first, last, pred);
+  *result = thrust::is_partitioned(exec, first, last, pred);
 }
 
 

  v[0] = 1;
  v[1] = 0;

  is_partitioned_kernel<<<1,1>>>(v.begin(), v.end(), is_even<T>(), result.begin());

  ASSERT_EQUAL(false, result[0]);

  thrust::partition(v.begin(), v.end(), is_even<T>());

  is_partitioned_kernel<<<1,1>>>(v.begin(), v.end(), is_even<T>(), result.begin());

  ASSERT_EQUAL(true, result[0]);
}
DECLARE_VARIABLE_UNITTEST(TestIsPartitionedDeviceSeq);


};


template<typename T, typename ExecutionPolicy>
void TestIsPartitionedDevice(ExecutionPolicy exec, size_t n)
{
  n = thrust::max<size_t>(n, 2);

