Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port cub::DeviceSegmentedReduce tests to catch2 #303

Merged
merged 6 commits into from
Aug 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixes c++11 compiler error
  • Loading branch information
elstehle committed Aug 4, 2023
commit 5930a9112db05bbca7fc2c1628ddb7c2d952afdd
4 changes: 2 additions & 2 deletions cub/test/catch2_test_device_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void compute_segmented_problem_reference(const thrust::device_vector<item_t> &d_
thrust::host_vector<offset_t> h_offsets(d_offsets);
auto seg_sizes_it = thrust::make_transform_iterator(
thrust::make_counting_iterator(std::size_t{0}),
[offsets_it = h_offsets.cbegin()](auto i) { return offsets_it[i + 1] - offsets_it[i]; });
[offsets_it = h_offsets.cbegin()](std::size_t i) { return offsets_it[i + 1] - offsets_it[i]; });
std::size_t num_segments = h_offsets.size() - 1;

compute_host_reference(h_items.cbegin(),
Expand Down Expand Up @@ -365,7 +365,7 @@ void compute_segmented_problem_reference(in_it_t in_it,
thrust::host_vector<offset_t> h_offsets(d_offsets);
auto seg_sizes_it = thrust::make_transform_iterator(
thrust::make_counting_iterator(std::size_t{0}),
[offsets_it = h_offsets.cbegin()](auto i) { return offsets_it[i + 1] - offsets_it[i]; });
[offsets_it = h_offsets.cbegin()](std::size_t i) { return offsets_it[i + 1] - offsets_it[i]; });
std::size_t num_segments = h_offsets.size() - 1;

compute_host_reference(in_it,
Expand Down