xpu
common.h File Reference

Common definitions for xpu. More...

Go to the source code of this file.

Classes

struct  xpu::dim
 
struct  xpu::grid
 3d execution grid describing the number of blocks and threads of a kernel Use 'n_blocks' or 'n_threads' to construct a grid. More...
 
class  xpu::buffer< T >
 

Namespaces

 xpu
 xpu default namespace.
 

Enumerations

enum  xpu::driver_t { xpu::cpu = detail::cpu , xpu::cuda = detail::cuda , xpu::hip = detail::hip , xpu::sycl = detail::sycl }
 
enum  xpu::buffer_type {
  xpu::buf_pinned = detail::buf_pinned , xpu::buf_device = detail::buf_device , xpu::buf_managed = detail::buf_managed , xpu::buf_io = detail::buf_io ,
  xpu::buf_stack = detail::buf_stack
}
 

Functions

grid xpu::n_blocks (dim nblocks)
 Construct a grid with the given number of blocks in each dimension. More...
 
grid xpu::n_threads (dim nthreads)
 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

Common definitions for xpu.

This file contains common definitions used by device and host code.

Include as #include <xpu/common.h>.