DeviceHistogram provides device-wide parallel operations for constructing histogram(s) from a sequence of samples data residing within device-accessible memory. More...
DeviceHistogram provides device-wide parallel operations for constructing histogram(s) from a sequence of samples data residing within device-accessible memory.
Definition at line 63 of file device_histogram.cuh.
Static Public Member Functions | |
Evenly-segmented bin ranges | |
template<typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | HistogramEven (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram, int num_levels, LevelT lower_level, LevelT upper_level, OffsetT num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes an intensity histogram from a sequence of data samples using equal-width bins. | |
template<typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | HistogramEven (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram, int num_levels, LevelT lower_level, LevelT upper_level, OffsetT num_row_samples, OffsetT num_rows, size_t row_stride_bytes, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes an intensity histogram from a sequence of data samples using equal-width bins. | |
template<int NUM_CHANNELS, int NUM_ACTIVE_CHANNELS, typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiHistogramEven (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram[NUM_ACTIVE_CHANNELS], int num_levels[NUM_ACTIVE_CHANNELS], LevelT lower_level[NUM_ACTIVE_CHANNELS], LevelT upper_level[NUM_ACTIVE_CHANNELS], OffsetT num_pixels, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using equal-width bins. | |
template<int NUM_CHANNELS, int NUM_ACTIVE_CHANNELS, typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiHistogramEven (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram[NUM_ACTIVE_CHANNELS], int num_levels[NUM_ACTIVE_CHANNELS], LevelT lower_level[NUM_ACTIVE_CHANNELS], LevelT upper_level[NUM_ACTIVE_CHANNELS], OffsetT num_row_pixels, OffsetT num_rows, size_t row_stride_bytes, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using equal-width bins. | |
Custom bin ranges | |
template<typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | HistogramRange (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram, int num_levels, LevelT *d_levels, OffsetT num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes an intensity histogram from a sequence of data samples using the specified bin boundary levels. | |
template<typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | HistogramRange (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram, int num_levels, LevelT *d_levels, OffsetT num_row_samples, OffsetT num_rows, size_t row_stride_bytes, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes an intensity histogram from a sequence of data samples using the specified bin boundary levels. | |
template<int NUM_CHANNELS, int NUM_ACTIVE_CHANNELS, typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiHistogramRange (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram[NUM_ACTIVE_CHANNELS], int num_levels[NUM_ACTIVE_CHANNELS], LevelT *d_levels[NUM_ACTIVE_CHANNELS], OffsetT num_pixels, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using the specified bin boundary levels. | |
template<int NUM_CHANNELS, int NUM_ACTIVE_CHANNELS, typename SampleIteratorT , typename CounterT , typename LevelT , typename OffsetT > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiHistogramRange (void *d_temp_storage, size_t &temp_storage_bytes, SampleIteratorT d_samples, CounterT *d_histogram[NUM_ACTIVE_CHANNELS], int num_levels[NUM_ACTIVE_CHANNELS], LevelT *d_levels[NUM_ACTIVE_CHANNELS], OffsetT num_row_pixels, OffsetT num_rows, size_t row_stride_bytes, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using the specified bin boundary levels. | |
|
inlinestatic |
Computes an intensity histogram from a sequence of data samples using equal-width bins.
d_samples
can be specified using the num_row_samples
, num_rows, and row_stride_bytes
parameters.(row_stride_bytes % sizeof(SampleT)) == 0
.num_levels
- 1)upper_level
- lower_level
) / (num_levels
- 1)SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the input sequence of data samples. |
[out] | d_histogram | The pointer to the histogram counter output array of length num_levels - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples. Implies that the number of bins is num_levels - 1. |
[in] | lower_level | The lower sample value bound (inclusive) for the lowest histogram bin. |
[in] | upper_level | The upper sample value bound (exclusive) for the highest histogram bin. |
[in] | num_row_samples | The number of data samples per row in the region of interest |
[in] | num_rows | The number of rows in the region of interest |
[in] | row_stride_bytes | The number of bytes between starts of consecutive rows in the region of interest |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 223 of file device_histogram.cuh.
|
inlinestatic |
Computes an intensity histogram from a sequence of data samples using equal-width bins.
num_levels
- 1)upper_level
- lower_level
) / (num_levels
- 1)SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the input sequence of data samples. |
[out] | d_histogram | The pointer to the histogram counter output array of length num_levels - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples. Implies that the number of bins is num_levels - 1. |
[in] | lower_level | The lower sample value bound (inclusive) for the lowest histogram bin. |
[in] | upper_level | The upper sample value bound (exclusive) for the highest histogram bin. |
[in] | num_samples | The number of input samples (i.e., the length of d_samples ) |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 124 of file device_histogram.cuh.
|
inlinestatic |
Computes an intensity histogram from a sequence of data samples using the specified bin boundary levels.
d_samples
can be specified using the num_row_samples
, num_rows, and row_stride_bytes
parameters.(row_stride_bytes % sizeof(SampleT)) == 0
.num_levels
- 1)level[i]
, level[i+1]
)SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the input sequence of data samples. |
[out] | d_histogram | The pointer to the histogram counter output array of length num_levels - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples. Implies that the number of bins is num_levels - 1. |
[in] | d_levels | The pointer to the array of boundaries (levels). Bin ranges are defined by consecutive boundary pairings: lower sample value boundaries are inclusive and upper sample value boundaries are exclusive. |
[in] | num_row_samples | The number of data samples per row in the region of interest |
[in] | num_rows | The number of rows in the region of interest |
[in] | row_stride_bytes | The number of bytes between starts of consecutive rows in the region of interest |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 623 of file device_histogram.cuh.
|
inlinestatic |
Computes an intensity histogram from a sequence of data samples using the specified bin boundary levels.
num_levels
- 1)level[i]
, level[i+1]
)SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the input sequence of data samples. |
[out] | d_histogram | The pointer to the histogram counter output array of length num_levels - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples. Implies that the number of bins is num_levels - 1. |
[in] | d_levels | The pointer to the array of boundaries (levels). Bin ranges are defined by consecutive boundary pairings: lower sample value boundaries are inclusive and upper sample value boundaries are exclusive. |
[in] | num_samples | The number of data samples per row in the region of interest |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 528 of file device_histogram.cuh.
|
inlinestatic |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using equal-width bins.
NUM_CHANNELS
consecutive data samples (e.g., an RGBA pixel).NUM_CHANNELS
specified, the function will only compute histograms for the first NUM_ACTIVE_CHANNELS
(e.g., only RGB histograms from RGBA pixel samples).num_levels[i]
- 1.upper_level[i]
- lower_level[i]
) / ( num_levels[i]
- 1)NUM_CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
NUM_ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the multi-channel input sequence of data samples. The samples from different channels are assumed to be interleaved (e.g., an array of 32-bit pixels where each pixel consists of four RGBA 8-bit samples). |
[out] | d_histogram | The pointers to the histogram counter output arrays, one for each active channel. For channeli, the allocation length of d_histogram[i] should be num_levels[i] - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples in each active channel. Implies that the number of bins for channeli is num_levels[i] - 1. |
[in] | lower_level | The lower sample value bound (inclusive) for the lowest histogram bin in each active channel. |
[in] | upper_level | The upper sample value bound (exclusive) for the highest histogram bin in each active channel. |
[in] | num_pixels | The number of multi-channel pixels (i.e., the length of d_samples / NUM_CHANNELS) |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 325 of file device_histogram.cuh.
|
inlinestatic |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using equal-width bins.
NUM_CHANNELS
consecutive data samples (e.g., an RGBA pixel).NUM_CHANNELS
specified, the function will only compute histograms for the first NUM_ACTIVE_CHANNELS
(e.g., only RGB histograms from RGBA pixel samples).d_samples
can be specified using the num_row_samples
, num_rows, and row_stride_bytes
parameters.(row_stride_bytes % sizeof(SampleT)) == 0
.num_levels[i]
- 1.upper_level[i]
- lower_level[i]
) / ( num_levels[i]
- 1)NUM_CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
NUM_ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the multi-channel input sequence of data samples. The samples from different channels are assumed to be interleaved (e.g., an array of 32-bit pixels where each pixel consists of four RGBA 8-bit samples). |
[out] | d_histogram | The pointers to the histogram counter output arrays, one for each active channel. For channeli, the allocation length of d_histogram[i] should be num_levels[i] - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples in each active channel. Implies that the number of bins for channeli is num_levels[i] - 1. |
[in] | lower_level | The lower sample value bound (inclusive) for the lowest histogram bin in each active channel. |
[in] | upper_level | The upper sample value bound (exclusive) for the highest histogram bin in each active channel. |
[in] | num_row_pixels | The number of multi-channel pixels per row in the region of interest |
[in] | num_rows | The number of rows in the region of interest |
[in] | row_stride_bytes | The number of bytes between starts of consecutive rows in the region of interest |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 432 of file device_histogram.cuh.
|
inlinestatic |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using the specified bin boundary levels.
NUM_CHANNELS
consecutive data samples (e.g., an RGBA pixel).NUM_CHANNELS
specified, the function will only compute histograms for the first NUM_ACTIVE_CHANNELS
(e.g., RGB histograms from RGBA pixel samples).num_levels[i]
- 1.upper_level[i]
- lower_level[i]
) / ( num_levels[i]
- 1)NUM_CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
NUM_ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the multi-channel input sequence of data samples. The samples from different channels are assumed to be interleaved (e.g., an array of 32-bit pixels where each pixel consists of four RGBA 8-bit samples). |
[out] | d_histogram | The pointers to the histogram counter output arrays, one for each active channel. For channeli, the allocation length of d_histogram[i] should be num_levels[i] - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples in each active channel. Implies that the number of bins for channeli is num_levels[i] - 1. |
[in] | d_levels | The pointers to the arrays of boundaries (levels), one for each active channel. Bin ranges are defined by consecutive boundary pairings: lower sample value boundaries are inclusive and upper sample value boundaries are exclusive. |
[in] | num_pixels | The number of multi-channel pixels (i.e., the length of d_samples / NUM_CHANNELS) |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 722 of file device_histogram.cuh.
|
inlinestatic |
Computes per-channel intensity histograms from a sequence of multi-channel "pixel" data samples using the specified bin boundary levels.
NUM_CHANNELS
consecutive data samples (e.g., an RGBA pixel).NUM_CHANNELS
specified, the function will only compute histograms for the first NUM_ACTIVE_CHANNELS
(e.g., RGB histograms from RGBA pixel samples).d_samples
can be specified using the num_row_samples
, num_rows, and row_stride_bytes
parameters.(row_stride_bytes % sizeof(SampleT)) == 0
.num_levels[i]
- 1.upper_level[i]
- lower_level[i]
) / ( num_levels[i]
- 1)NUM_CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
NUM_ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
SampleIteratorT | [inferred] Random-access input iterator type for reading input samples. \iterator |
CounterT | [inferred] Integer type for histogram bin counters |
LevelT | [inferred] Type for specifying boundaries (levels) |
OffsetT | [inferred] Signed integer type for sequence offsets, list lengths, pointer differences, etc. \offset_size1 |
The sample value type of the input iterator
[in] | d_temp_storage | Device-accessible allocation of temporary storage. When NULL, the required allocation size is written to temp_storage_bytes and no work is done. |
[in,out] | temp_storage_bytes | Reference to size in bytes of d_temp_storage allocation |
[in] | d_samples | The pointer to the multi-channel input sequence of data samples. The samples from different channels are assumed to be interleaved (e.g., an array of 32-bit pixels where each pixel consists of four RGBA 8-bit samples). |
[out] | d_histogram | The pointers to the histogram counter output arrays, one for each active channel. For channeli, the allocation length of d_histogram[i] should be num_levels[i] - 1. |
[in] | num_levels | The number of boundaries (levels) for delineating histogram samples in each active channel. Implies that the number of bins for channeli is num_levels[i] - 1. |
[in] | d_levels | The pointers to the arrays of boundaries (levels), one for each active channel. Bin ranges are defined by consecutive boundary pairings: lower sample value boundaries are inclusive and upper sample value boundaries are exclusive. |
[in] | num_row_pixels | The number of multi-channel pixels per row in the region of interest |
[in] | num_rows | The number of rows in the region of interest |
[in] | row_stride_bytes | The number of bytes between starts of consecutive rows in the region of interest |
[in] | stream | [optional] CUDA stream to launch kernels within. Default is stream0. |
[in] | debug_synchronous | [optional] Whether or not to synchronize the stream after every kernel launch to check for errors. May cause significant slowdown. Default is false . |
Definition at line 825 of file device_histogram.cuh.