Struct dim3#

Struct Documentation#

struct dim3#

A simple 3D dimension type for CUDA kernel launch configuration.

This struct mimics the behavior of dim3 from CUDA Runtime API and provides a compatible interface for kernel launch configuration. It can be constructed from 1, 2, or 3 dimensions.

Public Functions

inline dim3()#

Default constructor initializes to (1, 1, 1)

inline explicit dim3(unsigned int x_)#

Construct with x dimension, y and z default to 1.

inline dim3(unsigned int x_, unsigned int y_)#

Construct with x and y dimensions, z defaults to 1.

inline dim3(unsigned int x_, unsigned int y_, unsigned int z_)#

Construct with all three dimensions.

Public Members

unsigned int x#

X dimension (number of blocks in x-direction or threads in x-direction)

unsigned int y#

Y dimension (number of blocks in y-direction or threads in y-direction)

unsigned int z#

Z dimension (number of blocks in z-direction or threads in z-direction)