cub::LoadDirectBlockedVectorized#
-
template<CacheLoadModifier Modifier = LOAD_DEFAULT, int VecSize = 0, typename T, int ItemsPerThread, typename InputT>
void cub::LoadDirectBlockedVectorized( - int linear_tid,
- const InputT *block_src_ptr,
- T (&dst_items)[ItemsPerThread]
Load a linear segment of items into a blocked arrangement across the thread block.
Added in version 2.2.0: First appears in CUDA Toolkit 12.3.
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.
The following conditions will prevent vectorization and loading will fall back to cub::BLOCK_LOAD_DIRECT:
block_src_ptris not aligned to the vector access widthInputTis volatile or not trivially copyable
- Template Parameters:
Modifier – [optional] Cache load modifier for reading the input (default:
LOAD_DEFAULT)VecSize – [optional] The maximum number of consecutive items in a vector, which must evenly divide
ItemsPerThread.0is the same asItemsPerThread(default:0)T – [inferred] The data type to load.
ItemsPerThread – [inferred] The number of consecutive items partitioned onto each thread.
InputT – [inferred] The value type of the input, which is loaded with vectors and converted to
T.
- Parameters:
linear_tid – [in] A suitable 1D thread-identifier for the calling thread (e.g.,
(threadIdx.y * blockDim.x) + linear_tidfor 2D thread blocks)block_src_ptr – [in] The thread block’s base pointer for loading from
dst_items – [out] destination to load data into