LoadDirectStriped#

Overloads#

LoadDirectStriped(linear_tid, block_src_it, T(&dst_items)[ITEMS_PER_THREAD])#

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

Load a linear segment of items into a striped arrangement across the thread block.

Assumes a striped arrangement of (block-threads * items-per-thread) items across the thread block, where thread\ i owns items (i), (i + block-threads), …, (i + (block-threads * (items-per-thread - 1))). For multi-dimensional thread blocks, a row-major thread ordering is assumed.

Template Parameters:
  • BLOCK_THREADS – The thread block size in threads

  • 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

LoadDirectStriped(linear_tid, block_src_it, T(&dst_items)[ITEMS_PER_THREAD], block_items_end)#

template<int BLOCK_THREADS, typename T, int ITEMS_PER_THREAD, typename RandomAccessIterator>
void cub::LoadDirectStriped(
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 striped arrangement across the thread block, guarded by range

Assumes a striped arrangement of (block-threads * items-per-thread) items across the thread block, where thread\ i owns items (i), (i + block-threads), …, (i + (block-threads * (items-per-thread - 1))). For multi-dimensional thread blocks, a row-major thread ordering is assumed.

Template Parameters:
  • BLOCK_THREADS – The thread block size in threads

  • Tinferred The data type to load.

  • ITEMS_PER_THREADinferred The number of consecutive items partitioned onto each thread.

  • RandomAccessIteratorinferred 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] Number of valid items to load

LoadDirectStriped(linear_tid, block_src_it, T(&dst_items)[ITEMS_PER_THREAD], block_items_end, oob_default)#

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

Load a linear segment of items into a striped arrangement across the thread block, guarded by range, with a fall-back assignment of out-of-bound elements.

Assumes a striped arrangement of (block-threads * items-per-thread) items across the thread block, where thread\ i owns items (i), (i + block-threads), …, (i + (block-threads * (items-per-thread - 1))). For multi-dimensional thread blocks, a row-major thread ordering is assumed.

Template Parameters:
  • BLOCK_THREADS – The thread block size in threads

  • Tinferred The data type to load.

  • ITEMS_PER_THREADinferred The number of consecutive items partitioned onto each thread.

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

  • dst_items[out] Destination to load data into

  • block_items_end[in] Number of valid items to load

  • oob_default[in] Default value to assign out-of-bound items