Skip to content

Commit

Permalink
Restrict active histogram channels to channel count
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber committed May 31, 2024
1 parent ca0ca5a commit d59e9e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cub/cub/device/dispatch/dispatch_histogram.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ 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 d59e9e3

Please sign in to comment.