cub::LoadDirectBlocked

Defined in cub/block/block_load.cuh

template<typename T, int ITEMS_PER_THREAD, typename RandomAccessIterator>
void cub::LoadDirectBlocked(int linear_tid, RandomAccessIterator block_src_it, T (&dst_items)[ITEMS_PER_THREAD], int block_items_end)

Load a linear segment of items into a blocked arrangement across the thread block, guarded by range.

Assumes a blocked arrangement of (block-threads * items-per-thread) items across the thread block, where threadi owns the ith range of items-per-thread contiguous items. For multi-dimensional thread blocks, a row-major thread ordering is assumed.

Template Parameters
  • T[inferred] The data type to load.

  • ITEMS_PER_THREAD[inferred] The number of consecutive items partitioned onto each thread.

  • RandomAccessIterator[inferred] The random-access iterator type for input iterator.

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_src_it[in] The thread block’s base iterator for loading from

  • dst_items[out] Destination to load data into

  • block_items_end[in] First out-of-bounds index when loading from block_src_it