cub::LoadDirectWarpStriped
Defined in /home/runner/work/cccl/cccl/cub/cub/block/block_load.cuh
-
template<typename InputT, int ITEMS_PER_THREAD, typename InputIteratorT>
void cub::LoadDirectWarpStriped(int linear_tid, InputIteratorT block_itr, InputT (&items)[ITEMS_PER_THREAD], int valid_items) Load a linear segment of items into a warp-striped arrangement across the thread block, guarded by range
Assumes a warp-striped arrangement of elements across threads, where warpi owns the ith range of (warp-threads * items-per-thread) contiguous items, and each thread owns items (i), (i + warp-threads), …, (i + (warp-threads * (items-per-thread - 1))).
Usage Considerations
The number of threads in the thread block must be a multiple of the architecture’s warp size.
- Template Parameters
T – inferred The data type to load.
ITEMS_PER_THREAD – inferred The number of consecutive items partitioned onto each thread.
InputIteratorT – inferred The random-access iterator type for input (may be a simple pointer type).
- Parameters
linear_tid – [in] A suitable 1D thread-identifier for the calling thread (e.g.,
(threadIdx.y * blockDim.x) + linear_tid
for 2D thread blocks)block_itr – [in] The thread block’s base input iterator for loading from
items – [out] Data to load
valid_items – [in] Number of valid items to load