#include #include #include template struct TestZipIteratorStableSort { void operator()(const size_t n) { using namespace thrust; host_vector h1 = unittest::random_integers(n); host_vector h2 = unittest::random_integers(n); device_vector d1 = h1; device_vector d2 = h2; // sort on host stable_sort( make_zip_iterator(make_tuple(h1.begin(), h2.begin())), make_zip_iterator(make_tuple(h1.end(), h2.end())) ); // sort on device stable_sort( make_zip_iterator(make_tuple(d1.begin(), d2.begin())), make_zip_iterator(make_tuple(d1.end(), d2.end())) ); ASSERT_EQUAL_QUIET(h1, d1); ASSERT_EQUAL_QUIET(h2, d2); } }; VariableUnitTest > TestZipIteratorStableSortInstance;