diff --git a/cub/test/catch2_test_device_select_if_vsmem.cu b/cub/test/catch2_test_device_select_if_vsmem.cu index a5fbadd8444..9d60fe23ad5 100644 --- a/cub/test/catch2_test_device_select_if_vsmem.cu +++ b/cub/test/catch2_test_device_select_if_vsmem.cu @@ -65,21 +65,17 @@ CUB_TEST("DeviceSelect::If works for large types", "[select_if][vsmem][device]", using type = typename c2h::get<0, TestType>; const int num_items = GENERATE_COPY(take(2, random(1, 10000))); - thrust::device_vector in(num_items); - thrust::device_vector out(num_items); + c2h::device_vector in(num_items); + c2h::device_vector out(num_items); c2h::gen(CUB_SEED(2), in); - // just pick one of the input elements as boundary + // Just pick one of the input elements as boundary less_than_t le{in[num_items / 2]}; - // Needs to be device accessible + // Run test thrust::device_vector num_selected_out(1, 0); - int* d_first_num_selected_out = thrust::raw_pointer_cast(num_selected_out.data()); - select_if(in.begin(), out.begin(), num_selected_out.begin(), num_items, le); - std::cout << "Selected: " << num_selected_out[0] << "/" << num_items << "\n"; - // Ensure that we create the same output as std thrust::host_vector reference = in; std::stable_partition(reference.begin(), reference.end(), le); diff --git a/thrust/thrust/system/cuda/detail/adjacent_difference.h b/thrust/thrust/system/cuda/detail/adjacent_difference.h index 1d89fd4e811..0f5164d8df8 100644 --- a/thrust/thrust/system/cuda/detail/adjacent_difference.h +++ b/thrust/thrust/system/cuda/detail/adjacent_difference.h @@ -52,7 +52,6 @@ #include #include -#include #include THRUST_NAMESPACE_BEGIN