StoreDirectBlocked#

Overloads#

StoreDirectBlocked(linear_tid, block_itr, T(&items)[ITEMS_PER_THREAD])#

template<typename T, int ITEMS_PER_THREAD, typename OutputIteratorT>
void cub::StoreDirectBlocked(
int linear_tid,
OutputIteratorT block_itr,
T (&items)[ITEMS_PER_THREAD],
)

Store a blocked arrangement of items across a thread block into a linear segment of items

Assumes a blocked arrangement of (block-threads * items-per-thread) items across the thread block, where thread\ i owns the i\ th 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 store.

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

  • OutputIteratorT[inferred] The random-access iterator type for output (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 output iterator for storing to

  • items[in] Data to store

StoreDirectBlocked(linear_tid, block_itr, T(&items)[ITEMS_PER_THREAD], valid_items)#

template<typename T, int ITEMS_PER_THREAD, typename OutputIteratorT>
void cub::StoreDirectBlocked(
int linear_tid,
OutputIteratorT block_itr,
T (&items)[ITEMS_PER_THREAD],
int valid_items,
)

Store a blocked arrangement of items across a thread block into a linear segment of items, guarded by range

Assumes a blocked arrangement of (block-threads * items-per-thread) items across the thread block, where thread\ i owns the i\ th 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 store.

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

  • OutputIteratorT[inferred] The random-access iterator type for output (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 output iterator for storing to

  • items[in] Data to store

  • valid_items[in] Number of valid items to write