Vectorized Types#

template<typename T>
struct DVec#

Data vectorization helper for efficient global memory access.

Provides efficient vectorized memory load/store operations for CUDA kernels. Specialized for float and half types.

Template Parameters:

T – Element type

Public Functions

inline T &operator[](uint32_t idx)#

Access element at index.

Parameters:

idx – Element index

Returns:

Reference to element

inline T const &operator[](uint32_t idx) const#

Access element at index (const)

Parameters:

idx – Element index

Returns:

Const reference to element

inline void load(T const *ptr)#

Load vector from global memory.

Parameters:

ptr – Source pointer

inline void store(T *ptr) const#

Store vector to global memory.

Parameters:

ptr – Destination pointer

Public Static Attributes

static uint32_t vec_size = 0#

Number of elements in vector.