CUB
|
DeviceHistogram provides device-wide parallel operations for constructing histogram(s) from a sequence of samples data residing within global memory.
CUB_CDP
macro in your compiler's macro definitions.Definition at line 66 of file device_histogram.cuh.
Static Public Methods | |
Single-channel samples | |
template<int BINS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | SingleChannelSorting (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histogram, int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram using fast block-wide sorting. More... | |
template<int BINS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | SingleChannelSharedAtomic (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histogram, int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram using shared-memory atomic read-modify-write operations. More... | |
template<int BINS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | SingleChannelGlobalAtomic (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histogram, int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram using global-memory atomic read-modify-write operations. More... | |
Interleaved multi-channel samples | |
template<int BINS, int CHANNELS, int ACTIVE_CHANNELS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiChannelSorting (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histograms[ACTIVE_CHANNELS], int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram from multi-channel data using fast block-sorting. More... | |
template<int BINS, int CHANNELS, int ACTIVE_CHANNELS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiChannelSharedAtomic (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histograms[ACTIVE_CHANNELS], int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram from multi-channel data using shared-memory atomic read-modify-write operations. More... | |
template<int BINS, int CHANNELS, int ACTIVE_CHANNELS, typename InputIterator , typename HistoCounter > | |
static CUB_RUNTIME_FUNCTION cudaError_t | MultiChannelGlobalAtomic (void *d_temp_storage, size_t &temp_storage_bytes, InputIterator d_samples, HistoCounter *d_histograms[ACTIVE_CHANNELS], int num_samples, cudaStream_t stream=0, bool debug_synchronous=false) |
Computes a device-wide histogram from multi-channel data using global-memory atomic read-modify-write operations. More... | |
|
inlinestatic |
Computes a device-wide histogram using fast block-wide sorting.
num_samples
) must be a whole multiple of CHANNELS
.d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. BINS | Number of histogram bins per channel |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Input samples |
[out] | d_histogram | Array of BINS counters of integral type HistoCounter . |
[in] | num_samples | Number of samples to process |
[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 129 of file device_histogram.cuh.
|
inlinestatic |
Computes a device-wide histogram using shared-memory atomic read-modify-write operations.
d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. BINS | Number of histogram bins per channel |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Input samples |
[out] | d_histogram | Array of BINS counters of integral type HistoCounter . |
[in] | num_samples | Number of samples to process |
[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 217 of file device_histogram.cuh.
|
inlinestatic |
Computes a device-wide histogram using global-memory atomic read-modify-write operations.
d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. BINS | Number of histogram bins per channel |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Input samples |
[out] | d_histogram | Array of BINS counters of integral type HistoCounter . |
[in] | num_samples | Number of samples to process |
[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 305 of file device_histogram.cuh.
|
inlinestatic |
Computes a device-wide histogram from multi-channel data using fast block-sorting.
num_samples
) must be a whole multiple of CHANNELS
.d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. (E.g., RGB histograms from RGBA pixel samples.)BINS | Number of histogram bins per channel |
CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Pointer to the input sequence of sample items. The samples from different channels are assumed to be interleaved (e.g., an array of 32b pixels where each pixel consists of four RGBA 8b samples). |
[out] | d_histograms | Array of active channel histogram pointers, each pointing to an output array having BINS counters of integral type HistoCounter . |
[in] | num_samples | Total number of samples to process in all channels, including non-active 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 412 of file device_histogram.cuh.
|
inlinestatic |
Computes a device-wide histogram from multi-channel data using shared-memory atomic read-modify-write operations.
num_samples
) must be a whole multiple of CHANNELS
.d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. (E.g., RGB histograms from RGBA pixel samples.) BINS | Number of histogram bins per channel |
CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Pointer to the input sequence of sample items. The samples from different channels are assumed to be interleaved (e.g., an array of 32b pixels where each pixel consists of four RGBA 8b samples). |
[out] | d_histograms | Array of active channel histogram pointers, each pointing to an output array having BINS counters of integral type HistoCounter . |
[in] | num_samples | Total number of samples to process in all channels, including non-active 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 510 of file device_histogram.cuh.
|
inlinestatic |
Computes a device-wide histogram from multi-channel data using global-memory atomic read-modify-write operations.
num_samples
) must be a whole multiple of CHANNELS
.d_temp_storage
is NULL, no work is done and the required allocation size is returned in temp_storage_bytes
.CUB_CDP
macro in your compiler's macro definitions.unsigned char
samples. (E.g., RGB histograms from RGBA pixel samples.)BINS | Number of histogram bins per channel |
CHANNELS | Number of channels interleaved in the input data (may be greater than the number of channels being actively histogrammed) |
ACTIVE_CHANNELS | [inferred] Number of channels actively being histogrammed |
InputIterator | [inferred] Random-access input iterator type for reading input samples. (Must have an InputIterator::value_type that, when cast as an integer, falls in the range [0..BINS-1]) (may be a simple pointer type) |
HistoCounter | [inferred] Integer type for counting sample occurrences per histogram bin |
[in] | d_temp_storage | Device 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 | Pointer to the input sequence of sample items. The samples from different channels are assumed to be interleaved (e.g., an array of 32b pixels where each pixel consists of four RGBA 8b samples). |
[out] | d_histograms | Array of active channel histogram pointers, each pointing to an output array having BINS counters of integral type HistoCounter . |
[in] | num_samples | Total number of samples to process in all channels, including non-active 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 609 of file device_histogram.cuh.