xpu
xpu::grid Struct Reference

3d execution grid describing the number of blocks and threads of a kernel Use 'n_blocks' or 'n_threads' to construct a grid. More...

Public Member Functions

void get_compute_grid (dim &block_dim, dim &grid_dim) const
 

Public Attributes

dim nblocks
 
dim nthreads
 

Friends

grid n_blocks (dim)
 Construct a grid with the given number of blocks in each dimension. More...
 
grid n_threads (dim)
 Construct a grid with the given number of threads in each dimension If the number of threads is not a multiple of the block size, the grid size will be rounded up to the next multiple of the block size. More...
 

Detailed Description

3d execution grid describing the number of blocks and threads of a kernel Use 'n_blocks' or 'n_threads' to construct a grid.

Member Function Documentation

◆ get_compute_grid()

void xpu::grid::get_compute_grid ( dim block_dim,
dim grid_dim 
) const
inline

Friends And Related Function Documentation

◆ n_blocks

grid n_blocks ( dim  )
friend

Construct a grid with the given number of blocks in each dimension.

◆ n_threads

grid n_threads ( dim  )
friend

Construct a grid with the given number of threads in each dimension If the number of threads is not a multiple of the block size, the grid size will be rounded up to the next multiple of the block size.

Member Data Documentation

◆ nblocks

dim xpu::grid::nblocks

◆ nthreads

dim xpu::grid::nthreads

The documentation for this struct was generated from the following file: