GridEvenShare is a descriptor utility for distributing input among CUDA thread blocks in an "even-share" fashion. Each thread block gets roughly the same number of input tiles. More...
GridEvenShare is a descriptor utility for distributing input among CUDA thread blocks in an "even-share" fashion. Each thread block gets roughly the same number of input tiles.
BlockInit(). Definition at line 74 of file grid_even_share.cuh.
Public Member Functions | |
| __host__ __device__ __forceinline__ | GridEvenShare () |
| Constructor. | |
| __host__ __device__ __forceinline__ void | DispatchInit (OffsetT num_items, int max_grid_size, int tile_items) |
| Dispatch initializer. To be called prior prior to kernel launch. | |
| template<int TILE_ITEMS> | |
| __device__ __forceinline__ void | BlockInit (int block_id, Int2Type< GRID_MAPPING_RAKE >) |
| Initializes ranges for the specified thread block index. Specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles. | |
| template<int TILE_ITEMS> | |
| __device__ __forceinline__ void | BlockInit (int block_id, Int2Type< GRID_MAPPING_STRIP_MINE >) |
| Block-initialization, specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles. | |
| template<int TILE_ITEMS, GridMappingStrategy STRATEGY> | |
| __device__ __forceinline__ void | BlockInit () |
| Block-initialization, specialized for "strip mining" access pattern in which the input tiles assigned to each thread block are separated by a stride equal to the the extent of the grid. | |
| template<int TILE_ITEMS> | |
| __device__ __forceinline__ void | BlockInit (OffsetT block_offset, OffsetT block_end) |
| Block-initialization, specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles. | |
Data Fields | |
| OffsetT | num_items |
| Total number of input items. | |
| int | grid_size |
| Grid size in thread blocks. | |
| OffsetT | block_offset |
| OffsetT into input marking the beginning of the owning thread block's segment of input tiles. | |
| OffsetT | block_end |
| OffsetT into input of marking the end (one-past) of the owning thread block's segment of input tiles. | |
| OffsetT | block_stride |
| Stride between input tiles. | |
Private Attributes | |
| OffsetT | total_tiles |
| int | big_shares |
| OffsetT | big_share_items |
| OffsetT | normal_share_items |
| OffsetT | normal_base_offset |
|
inline |
Constructor.
Definition at line 105 of file grid_even_share.cuh.
|
inline |
Block-initialization, specialized for "strip mining" access pattern in which the input tiles assigned to each thread block are separated by a stride equal to the the extent of the grid.
Definition at line 191 of file grid_even_share.cuh.
|
inline |
Initializes ranges for the specified thread block index. Specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles.
Definition at line 146 of file grid_even_share.cuh.
|
inline |
Block-initialization, specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles.
Definition at line 173 of file grid_even_share.cuh.
|
inline |
Block-initialization, specialized for a "raking" access pattern in which each thread block is assigned a consecutive sequence of input tiles.
| [in] | block_offset | Threadblock begin offset (inclusive) |
| [in] | block_end | Threadblock end offset (exclusive) |
Definition at line 203 of file grid_even_share.cuh.
|
inline |
Dispatch initializer. To be called prior prior to kernel launch.
| num_items | Total number of input items |
| max_grid_size | Maximum grid size allowable (actual grid size may be less if not warranted by the the number of input items) |
| tile_items | Number of data items per input tile |
Definition at line 122 of file grid_even_share.cuh.
|
private |
Definition at line 80 of file grid_even_share.cuh.
|
private |
Definition at line 79 of file grid_even_share.cuh.
| OffsetT cub::GridEvenShare< OffsetT >::block_end |
OffsetT into input of marking the end (one-past) of the owning thread block's segment of input tiles.
Definition at line 96 of file grid_even_share.cuh.
| OffsetT cub::GridEvenShare< OffsetT >::block_offset |
OffsetT into input marking the beginning of the owning thread block's segment of input tiles.
Definition at line 93 of file grid_even_share.cuh.
| OffsetT cub::GridEvenShare< OffsetT >::block_stride |
Stride between input tiles.
Definition at line 99 of file grid_even_share.cuh.
| int cub::GridEvenShare< OffsetT >::grid_size |
Grid size in thread blocks.
Definition at line 90 of file grid_even_share.cuh.
|
private |
Definition at line 82 of file grid_even_share.cuh.
|
private |
Definition at line 81 of file grid_even_share.cuh.
| OffsetT cub::GridEvenShare< OffsetT >::num_items |
Total number of input items.
Definition at line 87 of file grid_even_share.cuh.
|
private |
Definition at line 78 of file grid_even_share.cuh.