Skip to content

Commit

Permalink
fixes narrowing conversion in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elstehle committed Jan 9, 2025
1 parent d593e1a commit b8cedc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cub/test/catch2_segmented_sort_helper.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ struct segment_index_to_offset_op
}
else if (i < num_segments)
{
return segment_size * (i - num_empty_segments);
return segment_size * static_cast<OffsetT>(i - num_empty_segments);
}
else
{
Expand Down Expand Up @@ -176,7 +176,7 @@ private:
std::size_t end_cycle = segment_end / sequence_length;

// Number of full cycles repeating the sequence
std::size_t full_cycles = (end_cycle > start_cycle) ? end_cycle - start_cycle : 0;
int full_cycles = (end_cycle > start_cycle) ? static_cast<int>(end_cycle - start_cycle) : 0;

// Add contributions from full cycles
c2h::host_vector<int> histogram(sequence_length, full_cycles);
Expand Down
3 changes: 0 additions & 3 deletions cub/test/catch2_test_device_segmented_sort_pairs.cu
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,6 @@ try
segment_iterator_t{num_empty_segments, num_segments, segment_size, num_items});
auto offsets_plus_1 = offsets + 1;

auto out_keys_ptr = thrust::raw_pointer_cast(out_keys.data());
auto out_values_ptr = thrust::raw_pointer_cast(out_values.data());

stable_sort_pairs(
thrust::raw_pointer_cast(in_keys.data()),
thrust::raw_pointer_cast(out_keys.data()),
Expand Down

0 comments on commit b8cedc1

Please sign in to comment.