Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed May 7, 2024
1 parent f22eef2 commit 8d8f5e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cub/test/test_device_histogram.cu
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ void TestHistogramEven(
// Allocate and initialize host and device data
c2h::host_vector<CounterT> h_histogram[NUM_ACTIVE_CHANNELS];
LevelT fpScales[NUM_ACTIVE_CHANNELS];
(void) fpScales; // TODO(bgruber): use [[maybe_unsued]] in C++17

for (int channel = 0; channel < NUM_ACTIVE_CHANNELS; ++channel)
{
Expand Down Expand Up @@ -495,6 +496,7 @@ void TestHistogramEven(
{
return static_cast<int>((static_cast<float>(sample) - min) * fpScales[channel]);
}
_LIBCUDACXX_UNREACHABLE();
};
InitializeBins<NUM_CHANNELS, NUM_ACTIVE_CHANNELS>(
h_samples, num_levels, transform_op, h_histogram, num_row_pixels, num_rows, row_stride_bytes);
Expand Down Expand Up @@ -1088,7 +1090,7 @@ void TestProblemSizes(LevelT max_level, int max_num_levels)
const OffsetT row_stride_bytes = num_row_pixels * NUM_CHANNELS * sizeof(SampleT);
for (std::size_t padding : {std::size_t{0}, 13 * sizeof(SampleT)})
{
const auto padded_row_stride_bytes = row_stride_bytes + padding;
const OffsetT padded_row_stride_bytes = row_stride_bytes + static_cast<OffsetT>(padding);
for (int entropy_reduction : {-1, 0, 5}) // entropy_reduction = -1 -> all samples == 0
{
// All different levels
Expand Down

0 comments on commit 8d8f5e4

Please sign in to comment.