Skip to content

Commit

Permalink
Restrict active histogram channels to channel count
Browse files Browse the repository at this point in the history
Fixes: #1792
  • Loading branch information
bernhardmgruber committed May 31, 2024
1 parent 8b5bf66 commit 67c7d32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cub/cub/device/dispatch/dispatch_histogram.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ template <int NUM_CHANNELS,
struct DispatchHistogram : SelectedPolicy
{
static_assert(NUM_CHANNELS <= 4, "Histograms only support up to 4 channels");
static_assert(NUM_ACTIVE_CHANNELS <= 4, "Histograms only support up to 4 active channels");
static_assert(NUM_ACTIVE_CHANNELS <= NUM_CHANNELS,
"Active channels must be at most the number of total channels of the input samples");

public:
//---------------------------------------------------------------------
Expand Down

0 comments on commit 67c7d32

Please sign in to comment.