Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Fix DeviceHistogram::Even for mixed float/int levels and sample types.
Browse files Browse the repository at this point in the history
Fixes #479 and #489.
  • Loading branch information
alliepiper committed Aug 9, 2022
1 parent 80f5878 commit cf20c71
Show file tree
Hide file tree
Showing 3 changed files with 310 additions and 142 deletions.
12 changes: 12 additions & 0 deletions cub/device/device_histogram.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ struct DeviceHistogram
* - The ranges `[d_samples, d_samples + num_samples)` and
* `[d_histogram, d_histogram + num_levels - 1)` shall not overlap
* in any way.
* - `cuda::std::common_type<LevelT, SampleT>` must be valid, and both LevelT
* and SampleT must be valid arithmetic types. The common type must be
* convertible to `int` and trivially copyable.
* - @devicestorage
*
* @par Snippet
Expand Down Expand Up @@ -247,6 +250,9 @@ struct DeviceHistogram
* `row_end = row_begin + num_row_samples`. The ranges
* `[row_begin, row_end)` and `[d_histogram, d_histogram + num_levels - 1)`
* shall not overlap in any way.
* - `cuda::std::common_type<LevelT, SampleT>` must be valid, and both LevelT
* and SampleT must be valid arithmetic types. The common type must be
* convertible to `int` and trivially copyable.
* - @devicestorage
*
* @par Snippet
Expand Down Expand Up @@ -432,6 +438,9 @@ struct DeviceHistogram
* `[d_samples, d_samples + NUM_CHANNELS * num_pixels)` and
* `[d_histogram[c], d_histogram[c] + num_levels[c] - 1)` shall not overlap
* in any way.
* - `cuda::std::common_type<LevelT, SampleT>` must be valid, and both LevelT
* and SampleT must be valid arithmetic types. The common type must be
* convertible to `int` and trivially copyable.
* - @devicestorage
*
* @par Snippet
Expand Down Expand Up @@ -633,6 +642,9 @@ struct DeviceHistogram
* `[sample_begin, sample_end)` and
* `[d_histogram[c], d_histogram[c] + num_levels[c] - 1)` shall not overlap
* in any way.
* - `cuda::std::common_type<LevelT, SampleT>` must be valid, and both LevelT
* and SampleT must be valid arithmetic types. The common type must be
* convertible to `int` and trivially copyable.
* - @devicestorage
*
* @par Snippet
Expand Down
Loading

0 comments on commit cf20c71

Please sign in to comment.