     typename thrust::host_vector<T>::iterator   h_new_end;
     typename thrust::device_vector<T>::iterator d_new_end;
 
-    // test with Predicate that returns a bool
     {
         thrust::host_vector<T>   h_result(n);
         thrust::device_vector<T> d_result(n);
 
-        h_new_end = thrust::copy_if(h_data.begin(), h_data.end(), h_result.begin(), is_even<T>());
-        d_new_end = thrust::copy_if(d_data.begin(), d_data.end(), d_result.begin(), is_even<T>());
+        h_new_end = thrust::copy_if(h_data.begin(), h_data.end(), h_stencil.begin(), h_result.begin(), is_even<T>());
+        d_new_end = thrust::copy_if(d_data.begin(), d_data.end(), d_stencil.begin(), d_result.begin(), is_even<T>());
 
         h_result.resize(h_new_end - h_result.begin());
         d_result.resize(d_new_end - d_result.begin());
 
         ASSERT_EQUAL(h_result, d_result);
     }
-    
-    // test with Predicate that returns a non-bool
-    {
-        thrust::host_vector<T>   h_result(n);
-        thrust::device_vector<T> d_result(n);
-
-        h_new_end = thrust::copy_if(h_data.begin(), h_data.end(), h_result.begin(), mod_3<T>());
-        d_new_end = thrust::copy_if(d_data.begin(), d_data.end(), d_result.begin(), mod_3<T>());
-
-        h_result.resize(h_new_end - h_result.begin());
-        d_result.resize(d_new_end - d_result.begin());
-
-        ASSERT_EQUAL(h_result, d_result);
-    }
-}
-DECLARE_VARIABLE_UNITTEST(TestCopyIfStencil);
+
+}
+DECLARE_INTEGRAL_VARIABLE_UNITTEST(TestCopyIfStencil);
+
 
 template <typename Vector>
 void TestCopyCountingIterator(void)


        ASSERT_EQUAL(h_result, d_result);
    }
    
    // test with Predicate that returns a non-bool
    {
        thrust::host_vector<T>   h_result(n);

    l.push_back(2);
    l.push_back(3);
    l.push_back(4);

    Vector v(l.size());

    typename Vector::iterator v_result = thrust::copy(l.begin(), l.end(), v.begin());
