   ASSERT_EQUAL(v[3], 3);
   ASSERT_EQUAL(v[4], 4);
   
-  sequence_kernel<<<1,1>>>(v.begin(), v.end(), 10);
+  sequence_kernel<<<1,1>>>(exec, v.begin(), v.end(), 10);
   
   ASSERT_EQUAL(v[0], 10);
   ASSERT_EQUAL(v[1], 11);

  ASSERT_EQUAL(v[3], 13);
  ASSERT_EQUAL(v[4], 14);
  
  sequence_kernel<<<1,1>>>(v.begin(), v.end(), 10, 2);
  
  ASSERT_EQUAL(v[0], 10);
  ASSERT_EQUAL(v[1], 12);

#include <thrust/execution_policy.h>


template<typename ExecutionPolicy, typename Iterator>
__global__
void sequence_kernel(ExecutionPolicy exec, Iterator first, Iterator last)
{
  thrust::sequence(exec, first, last);
}


template<typename ExecutionPolicy, typename Iterator, typename T>
__global__
void sequence_kernel(ExecutionPolicy exec, Iterator first, Iterator last, T init)
{
  thrust::sequence(exec, first, last, init);
}


template<typename ExecutionPolicy, typename Iterator, typename T>
__global__
void sequence_kernel(ExecutionPolicy exec, Iterator first, Iterator last, T init, T step)
{
  thrust::sequence(exec, first, last, init, step);
}


template<typename ExecutionPolicy>
void TestSequenceDevice(ExecutionPolicy exec)
{
  thrust::device_vector<int> v(5);
  
  sequence_kernel<<<1,1>>>(exec, v.begin(), v.end());
  
  ASSERT_EQUAL(v[0], 0);
  ASSERT_EQUAL(v[1], 1);
