38#include "../util_ptx.cuh"
39#include "../util_arch.cuh"
40#include "../util_namespace.cuh"
151 int ITEMS_PER_THREAD,
211 return private_storage;
290 template <
typename CounterT >
294 int histo_offset = 0;
348 T (&items)[ITEMS_PER_THREAD],
349 CounterT histogram[BINS])
405 T (&items)[ITEMS_PER_THREAD],
406 CounterT histogram[BINS])
The BlockHistogram class provides collective methods for constructing block-wide histograms from data...
__device__ __forceinline__ void InitHistogram(CounterT histogram[BINS])
Initialize the shared histogram counters to zero.
__device__ __forceinline__ BlockHistogram()
Collective constructor using a private static allocation of shared memory as temporary storage.
__device__ __forceinline__ void Histogram(T(&items)[ITEMS_PER_THREAD], CounterT histogram[BINS])
Constructs a block-wide histogram in shared/device-accessible memory. Each thread contributes an arra...
@ BLOCK_THREADS
The thread block size in threads.
unsigned int linear_tid
Linear thread-id.
If<(SAFE_ALGORITHM==BLOCK_HISTO_SORT), BlockHistogramSort< T, BLOCK_DIM_X, ITEMS_PER_THREAD, BINS, BLOCK_DIM_Y, BLOCK_DIM_Z, PTX_ARCH >, BlockHistogramAtomic< BINS > >::Type InternalBlockHistogram
Internal specialization.
__device__ __forceinline__ BlockHistogram(TempStorage &temp_storage)
Collective constructor using the specified memory allocation as temporary storage.
_TempStorage & temp_storage
Shared storage reference.
InternalBlockHistogram::TempStorage _TempStorage
Shared memory storage layout type for BlockHistogram.
__device__ __forceinline__ void Composite(T(&items)[ITEMS_PER_THREAD], CounterT histogram[BINS])
Updates an existing block-wide histogram in shared/device-accessible memory. Each thread composites a...
static const BlockHistogramAlgorithm SAFE_ALGORITHM
__device__ __forceinline__ _TempStorage & PrivateStorage()
Internal storage allocator.
BlockRadixRank provides operations for ranking unsigned integer types within a CUDA thread block.
__device__ __forceinline__ int RowMajorTid(int block_dim_x, int block_dim_y, int block_dim_z)
Returns the row-major linear thread identifier for a multidimensional thread block.
Optional outer namespace(s)
BlockHistogramAlgorithm
BlockHistogramAlgorithm enumerates alternative algorithms for the parallel construction of block-wide...
The BlockHistogramAtomic class provides atomic-based methods for constructing block-wide histograms f...
Alias wrapper allowing storage to be unioned.
The BlockHistogramSort class provides sorting-based methods for constructing block-wide histograms fr...
\smemstorage{BlockHistogram}
Type selection (IF ? ThenType : ElseType)
A storage-backing wrapper that allows types with non-trivial constructors to be aliased in unions.
#define CUB_PTX_ARCH
CUB_PTX_ARCH reflects the PTX version targeted by the active compiler pass (or zero during the host p...