AgentRadixSortDownsweep implements a stateful abstraction of CUDA thread blocks for participating in device-wide radix sort downsweep . More...
AgentRadixSortDownsweep implements a stateful abstraction of CUDA thread blocks for participating in device-wide radix sort downsweep .
< Signed integer type for global offsets
Definition at line 113 of file agent_radix_sort_downsweep.cuh.
Data Structures | |
struct | TempStorage |
Alias wrapper allowing storage to be unioned. More... | |
Public Types | |
enum | { BLOCK_THREADS = AgentRadixSortDownsweepPolicy::BLOCK_THREADS , ITEMS_PER_THREAD = AgentRadixSortDownsweepPolicy::ITEMS_PER_THREAD , RADIX_BITS = AgentRadixSortDownsweepPolicy::RADIX_BITS , TILE_ITEMS = BLOCK_THREADS * ITEMS_PER_THREAD , RADIX_DIGITS = 1 << RADIX_BITS , KEYS_ONLY = Equals<ValueT, NullType>::VALUE } |
enum | { BINS_TRACKED_PER_THREAD = BlockRadixRankT::BINS_TRACKED_PER_THREAD } |
typedef Traits< KeyT >::UnsignedBits | UnsignedBits |
typedef CacheModifiedInputIterator< LOAD_MODIFIER, UnsignedBits, OffsetT > | KeysItr |
typedef CacheModifiedInputIterator< LOAD_MODIFIER, ValueT, OffsetT > | ValuesItr |
typedef If<(RANK_ALGORITHM==RADIX_RANK_BASIC), BlockRadixRank< BLOCK_THREADS, RADIX_BITS, IS_DESCENDING, false, SCAN_ALGORITHM >, typenameIf<(RANK_ALGORITHM==RADIX_RANK_MEMOIZE), BlockRadixRank< BLOCK_THREADS, RADIX_BITS, IS_DESCENDING, true, SCAN_ALGORITHM >, BlockRadixRankMatch< BLOCK_THREADS, RADIX_BITS, IS_DESCENDING, SCAN_ALGORITHM > >::Type >::Type | BlockRadixRankT |
typedef BlockLoad< UnsignedBits, BLOCK_THREADS, ITEMS_PER_THREAD, LOAD_ALGORITHM > | BlockLoadKeysT |
typedef BlockLoad< ValueT, BLOCK_THREADS, ITEMS_PER_THREAD, LOAD_ALGORITHM > | BlockLoadValuesT |
typedef ValueT | ValueExchangeT[TILE_ITEMS] |
Public Member Functions | |
union | __align__ (16) _TempStorage |
template<bool FULL_TILE> | |
__device__ __forceinline__ void | ScatterKeys (UnsignedBits(&twiddled_keys)[ITEMS_PER_THREAD], OffsetT(&relative_bin_offsets)[ITEMS_PER_THREAD], int(&ranks)[ITEMS_PER_THREAD], OffsetT valid_items) |
template<bool FULL_TILE> | |
__device__ __forceinline__ void | ScatterValues (ValueT(&values)[ITEMS_PER_THREAD], OffsetT(&relative_bin_offsets)[ITEMS_PER_THREAD], int(&ranks)[ITEMS_PER_THREAD], OffsetT valid_items) |
template<int _RANK_ALGORITHM> | |
__device__ __forceinline__ void | LoadKeys (UnsignedBits(&keys)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, UnsignedBits oob_item, Int2Type< true > is_full_tile, Int2Type< _RANK_ALGORITHM > rank_algorithm) |
template<int _RANK_ALGORITHM> | |
__device__ __forceinline__ void | LoadKeys (UnsignedBits(&keys)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, UnsignedBits oob_item, Int2Type< false > is_full_tile, Int2Type< _RANK_ALGORITHM > rank_algorithm) |
__device__ __forceinline__ void | LoadKeys (UnsignedBits(&keys)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, UnsignedBits oob_item, Int2Type< true > is_full_tile, Int2Type< RADIX_RANK_MATCH > rank_algorithm) |
__device__ __forceinline__ void | LoadKeys (UnsignedBits(&keys)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, UnsignedBits oob_item, Int2Type< false > is_full_tile, Int2Type< RADIX_RANK_MATCH > rank_algorithm) |
template<int _RANK_ALGORITHM> | |
__device__ __forceinline__ void | LoadValues (ValueT(&values)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, Int2Type< true > is_full_tile, Int2Type< _RANK_ALGORITHM > rank_algorithm) |
template<int _RANK_ALGORITHM> | |
__device__ __forceinline__ void | LoadValues (ValueT(&values)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, Int2Type< false > is_full_tile, Int2Type< _RANK_ALGORITHM > rank_algorithm) |
__device__ __forceinline__ void | LoadValues (ValueT(&values)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, Int2Type< true > is_full_tile, Int2Type< RADIX_RANK_MATCH > rank_algorithm) |
__device__ __forceinline__ void | LoadValues (ValueT(&values)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, Int2Type< false > is_full_tile, Int2Type< RADIX_RANK_MATCH > rank_algorithm) |
template<bool FULL_TILE> | |
__device__ __forceinline__ void | GatherScatterValues (OffsetT(&relative_bin_offsets)[ITEMS_PER_THREAD], int(&ranks)[ITEMS_PER_THREAD], OffsetT block_offset, OffsetT valid_items, Int2Type< false >) |
template<bool FULL_TILE> | |
__device__ __forceinline__ void | GatherScatterValues (OffsetT(&)[ITEMS_PER_THREAD], int(&)[ITEMS_PER_THREAD], OffsetT, OffsetT, Int2Type< true >) |
template<bool FULL_TILE> | |
__device__ __forceinline__ void | ProcessTile (OffsetT block_offset, const OffsetT &valid_items=TILE_ITEMS) |
template<typename InputIteratorT , typename T > | |
__device__ __forceinline__ void | Copy (InputIteratorT d_in, T *d_out, OffsetT block_offset, OffsetT block_end) |
template<typename InputIteratorT > | |
__device__ __forceinline__ void | Copy (InputIteratorT, NullType *, OffsetT, OffsetT) |
__device__ __forceinline__ | AgentRadixSortDownsweep (TempStorage &temp_storage, OffsetT(&bin_offset)[BINS_TRACKED_PER_THREAD], OffsetT num_items, const KeyT *d_keys_in, KeyT *d_keys_out, const ValueT *d_values_in, ValueT *d_values_out, int current_bit, int num_bits) |
__device__ __forceinline__ | AgentRadixSortDownsweep (TempStorage &temp_storage, OffsetT num_items, OffsetT *d_spine, const KeyT *d_keys_in, KeyT *d_keys_out, const ValueT *d_values_in, ValueT *d_values_out, int current_bit, int num_bits) |
__device__ __forceinline__ void | ProcessRegion (OffsetT block_offset, OffsetT block_end) |
Data Fields | |
_TempStorage & | temp_storage |
KeysItr | d_keys_in |
ValuesItr | d_values_in |
UnsignedBits * | d_keys_out |
ValueT * | d_values_out |
OffsetT | bin_offset [BINS_TRACKED_PER_THREAD] |
int | current_bit |
int | num_bits |
int | short_circuit |
Static Public Attributes | |
static const UnsignedBits | LOWEST_KEY = Traits<KeyT>::LOWEST_KEY |
static const UnsignedBits | MAX_KEY = Traits<KeyT>::MAX_KEY |
static const BlockLoadAlgorithm | LOAD_ALGORITHM = AgentRadixSortDownsweepPolicy::LOAD_ALGORITHM |
static const CacheLoadModifier | LOAD_MODIFIER = AgentRadixSortDownsweepPolicy::LOAD_MODIFIER |
static const RadixRankAlgorithm | RANK_ALGORITHM = AgentRadixSortDownsweepPolicy::RANK_ALGORITHM |
static const BlockScanAlgorithm | SCAN_ALGORITHM = AgentRadixSortDownsweepPolicy::SCAN_ALGORITHM |
typedef BlockLoad< UnsignedBits, BLOCK_THREADS, ITEMS_PER_THREAD, LOAD_ALGORITHM> cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::BlockLoadKeysT |
Definition at line 165 of file agent_radix_sort_downsweep.cuh.
typedef BlockLoad< ValueT, BLOCK_THREADS, ITEMS_PER_THREAD, LOAD_ALGORITHM> cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::BlockLoadValuesT |
Definition at line 172 of file agent_radix_sort_downsweep.cuh.
typedef If<(RANK_ALGORITHM==RADIX_RANK_BASIC),BlockRadixRank<BLOCK_THREADS,RADIX_BITS,IS_DESCENDING,false,SCAN_ALGORITHM>,typenameIf<(RANK_ALGORITHM==RADIX_RANK_MEMOIZE),BlockRadixRank<BLOCK_THREADS,RADIX_BITS,IS_DESCENDING,true,SCAN_ALGORITHM>,BlockRadixRankMatch<BLOCK_THREADS,RADIX_BITS,IS_DESCENDING,SCAN_ALGORITHM>>::Type>::Type cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::BlockRadixRankT |
Definition at line 152 of file agent_radix_sort_downsweep.cuh.
typedef CacheModifiedInputIterator<LOAD_MODIFIER, UnsignedBits, OffsetT> cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::KeysItr |
Definition at line 142 of file agent_radix_sort_downsweep.cuh.
typedef Traits<KeyT>::UnsignedBits cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::UnsignedBits |
Definition at line 120 of file agent_radix_sort_downsweep.cuh.
typedef ValueT cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::ValueExchangeT[TILE_ITEMS] |
Definition at line 175 of file agent_radix_sort_downsweep.cuh.
typedef CacheModifiedInputIterator<LOAD_MODIFIER, ValueT, OffsetT> cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::ValuesItr |
Definition at line 143 of file agent_radix_sort_downsweep.cuh.
anonymous enum |
Definition at line 130 of file agent_radix_sort_downsweep.cuh.
anonymous enum |
Enumerator | |
---|---|
BINS_TRACKED_PER_THREAD | Number of bin-starting offsets tracked per thread. |
Definition at line 154 of file agent_radix_sort_downsweep.cuh.
|
inline |
Constructor
Definition at line 663 of file agent_radix_sort_downsweep.cuh.
|
inline |
Constructor
Definition at line 703 of file agent_radix_sort_downsweep.cuh.
|
inline |
Shared memory storage layout
Definition at line 175 of file agent_radix_sort_downsweep.cuh.
|
inline |
Copy tiles within the range of input
Definition at line 612 of file agent_radix_sort_downsweep.cuh.
|
inline |
Copy tiles within the range of input (specialized for NullType)
Definition at line 648 of file agent_radix_sort_downsweep.cuh.
|
inline |
Truck along associated values (specialized for key-only sorting)
Definition at line 486 of file agent_radix_sort_downsweep.cuh.
|
inline |
Truck along associated values
Definition at line 456 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of keys (specialized for partial tile, any ranking algorithm)
Definition at line 327 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of keys (specialized for partial tile, match ranking algorithm)
Definition at line 364 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of keys (specialized for full tile, any ranking algorithm)
Definition at line 308 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of keys (specialized for full tile, match ranking algorithm)
Definition at line 349 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of values (specialized for partial tile, any ranking algorithm)
Definition at line 402 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of items (specialized for partial tile, match ranking algorithm)
Definition at line 437 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of values (specialized for full tile, any ranking algorithm)
Definition at line 384 of file agent_radix_sort_downsweep.cuh.
|
inline |
Load a tile of items (specialized for full tile, match ranking algorithm)
Definition at line 423 of file agent_radix_sort_downsweep.cuh.
|
inline |
Distribute keys from a segment of input tiles.
Definition at line 750 of file agent_radix_sort_downsweep.cuh.
|
inline |
Process tile
Definition at line 499 of file agent_radix_sort_downsweep.cuh.
|
inline |
Scatter ranked keys through shared memory, then to device-accessible memory
Definition at line 236 of file agent_radix_sort_downsweep.cuh.
|
inline |
Scatter ranked values through shared memory, then to device-accessible memory
Definition at line 273 of file agent_radix_sort_downsweep.cuh.
OffsetT cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::bin_offset[BINS_TRACKED_PER_THREAD] |
Definition at line 216 of file agent_radix_sort_downsweep.cuh.
int cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::current_bit |
Definition at line 219 of file agent_radix_sort_downsweep.cuh.
KeysItr cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::d_keys_in |
Definition at line 210 of file agent_radix_sort_downsweep.cuh.
UnsignedBits* cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::d_keys_out |
Definition at line 212 of file agent_radix_sort_downsweep.cuh.
ValuesItr cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::d_values_in |
Definition at line 211 of file agent_radix_sort_downsweep.cuh.
ValueT* cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::d_values_out |
Definition at line 213 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 125 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 126 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 122 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 123 of file agent_radix_sort_downsweep.cuh.
int cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::num_bits |
Definition at line 222 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 127 of file agent_radix_sort_downsweep.cuh.
|
static |
Definition at line 128 of file agent_radix_sort_downsweep.cuh.
int cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::short_circuit |
Definition at line 225 of file agent_radix_sort_downsweep.cuh.
_TempStorage& cub::AgentRadixSortDownsweep< AgentRadixSortDownsweepPolicy, IS_DESCENDING, KeyT, ValueT, OffsetT >::temp_storage |
Definition at line 207 of file agent_radix_sort_downsweep.cuh.