|
CUB
|
BlockExchange provides operations for reorganizing the partitioning of ordered data across a CUDA threadblock.
| T | The data type to be exchanged. |
| BLOCK_THREADS | The threadblock size in threads. |
| ITEMS_PER_THREAD | The number of items partitioned onto each thread. |
__syncthreads() barrier is required if the supplied BlockExchange::SmemStorage is to be reused or repurposed by the threadblockPublic Types | |
| typedef SmemStorage | SmemStorage |
The operations exposed by BlockExchange require shared memory of this type. This opaque storage can be allocated directly using the __shared__ keyword. Alternatively, it can be aliased to externally allocated shared memory or union'd with other types to facilitate shared memory reuse. | |
Static Public Methods | |
Transpose exchanges | |
| static __device__ __forceinline__ void | BlockedToStriped (SmemStorage &smem_storage, T items[ITEMS_PER_THREAD]) |
| Transposes data items from blocked arrangement to striped arrangement. More... | |
| static __device__ __forceinline__ void | StripedToBlocked (SmemStorage &smem_storage, T items[ITEMS_PER_THREAD]) |
| Transposes data items from striped arrangement to blocked arrangement. More... | |
Scatter exchanges | |
| static __device__ __forceinline__ void | ScatterToBlocked (SmemStorage &smem_storage, T items[ITEMS_PER_THREAD], unsigned int ranks[ITEMS_PER_THREAD]) |
| Exchanges data items annotated by rank into blocked arrangement. More... | |
| static __device__ __forceinline__ void | ScatterToStriped (SmemStorage &smem_storage, T items[ITEMS_PER_THREAD], unsigned int ranks[ITEMS_PER_THREAD]) |
| Exchanges data items annotated by rank into striped arrangement. More... | |
|
inlinestatic |
Transposes data items from blocked arrangement to striped arrangement.
A subsequent __syncthreads() threadblock barrier should be invoked after calling this method if the supplied smem_storage is to be reused or repurposed by the threadblock.
| [in] | smem_storage | Shared reference to opaque SmemStorage layout |
| [in,out] | items | Items to exchange, converting between blocked and striped arrangements. |
|
inlinestatic |
Transposes data items from striped arrangement to blocked arrangement.
A subsequent __syncthreads() threadblock barrier should be invoked after calling this method if the supplied smem_storage is to be reused or repurposed by the threadblock.
| [in] | smem_storage | Shared reference to opaque SmemStorage layout |
| [in,out] | items | Items to exchange, converting between striped and blocked arrangements. |
|
inlinestatic |
Exchanges data items annotated by rank into blocked arrangement.
A subsequent __syncthreads() threadblock barrier should be invoked after calling this method if the supplied smem_storage is to be reused or repurposed by the threadblock.
| [in] | smem_storage | Shared reference to opaque SmemStorage layout |
| [in,out] | items | Items to exchange |
| [in] | ranks | Corresponding scatter ranks |
|
inlinestatic |
Exchanges data items annotated by rank into striped arrangement.
A subsequent __syncthreads() threadblock barrier should be invoked after calling this method if the supplied smem_storage is to be reused or repurposed by the threadblock.
| [in] | smem_storage | Shared reference to opaque SmemStorage layout |
| [in,out] | items | Items to exchange |
| [in] | ranks | Corresponding scatter ranks |
1.8.3.1