   
   size_t h_size = thrust::remove_copy_if(h_data.begin(), h_data.end(), h_stencil.begin(), h_result.begin(), is_true<T>()) - h_result.begin();
 
-  remove_copy_if_kernel<<<1,1>>>(d_data.begin(), d_data.end(), d_stencil.begin(), d_result.begin(), is_true<T>(), d_new_end.begin());
+  remove_copy_if_kernel<<<1,1>>>(exec, d_data.begin(), d_data.end(), d_stencil.begin(), d_result.begin(), is_true<T>(), d_new_end.begin());
   size_t d_size = (iterator)d_new_end[0] - d_result.begin();
   
   ASSERT_EQUAL(h_size, d_size);

  thrust::device_vector<iterator> d_result(1);
  
  size_t h_size = thrust::remove(h_data.begin(), h_data.end(), T(0)) - h_data.begin();
  remove_kernel<<<1,1>>>(d_data.begin(), d_data.end(), T(0), d_result.begin());
  size_t d_size = (iterator)d_result[0] - d_data.begin();
  
  ASSERT_EQUAL(h_size, d_size);

  
  ASSERT_EQUAL(h_result, d_result);
}


template<typename T>
void TestRemoveCopyIfStencilDeviceSeq(const size_t n)
{
  TestRemoveCopyIfStencilDevice<T>(thrust::seq, n);
}
DECLARE_VARIABLE_UNITTEST(TestRemoveCopyIfStencilDeviceSeq);


template<typename T>
void TestRemoveCopyIfStencilDeviceDevice(const size_t n)
{
  TestRemoveCopyIfStencilDevice<T>(thrust::device, n);
}
DECLARE_VARIABLE_UNITTEST(TestRemoveCopyIfStencilDeviceDevice);

