Skip to content

Commit 5d89b4a

Browse files
oleksandr-pavlykbernhardmgruber
authored andcommitted
Specify cuda::counting_iterator template parameter
This works around issues with older compiler GCC7, GCC11 which could not deduce template parameter for some reason.
1 parent 11c4600 commit 5d89b4a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

cub/test/catch2_test_device_partition_flagged.cu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ try
406406

407407
// Prepare expected data
408408
auto expected_selected_it = cuda::counting_iterator(offset_t{0});
409-
auto expected_rejected_it =
410-
cuda::std::make_reverse_iterator(cuda::counting_iterator(offset_t{cut_off_index}) + (num_items - cut_off_index));
409+
auto expected_rejected_it = cuda::std::make_reverse_iterator(cuda::counting_iterator<offset_t>(num_items));
411410
auto expected_result_op =
412411
make_index_to_expected_partition_op(expected_selected_it, expected_rejected_it, cut_off_index);
413412
auto expected_result_it = cuda::transform_iterator(cuda::counting_iterator(offset_t{0}), expected_result_op);

cub/test/catch2_test_device_partition_if.cu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,7 @@ try
317317

318318
// Prepare expected data
319319
auto expected_selected_it = cuda::counting_iterator(offset_t{0});
320-
auto expected_rejected_it =
321-
cuda::std::make_reverse_iterator(cuda::counting_iterator(offset_t{cut_off_index}) + (num_items - cut_off_index));
320+
auto expected_rejected_it = cuda::std::make_reverse_iterator(cuda::counting_iterator<offset_t>(num_items));
322321
auto expected_result_op =
323322
make_index_to_expected_partition_op(expected_selected_it, expected_rejected_it, cut_off_index);
324323
auto expected_result_it = cuda::transform_iterator(cuda::counting_iterator(offset_t{0}), expected_result_op);

0 commit comments

Comments
 (0)