xpu
xpu::device_prop Class Reference

Public Member Functions

 device_prop ()=delete
 
 device_prop (device)
 Query properties of the given device. More...
 
std::string_view name () const
 Get the name of the device. More...
 
driver_t backend () const
 Get the backend associated with the device. More...
 
std::string_view arch () const
 Returns the architecture of the device, if applicable. More...
 
size_t shared_mem_size () const
 Returns the size of shared memory per block in bytes. More...
 
size_t const_mem_size () const
 Returns the size of constant memory in bytes. More...
 
size_t warp_size () const
 Returns the number of threads in a warp. More...
 
size_t max_threads_per_block () const
 Returns the max number of threads in a block. More...
 
std::array< size_t, 3 > max_grid_size () const
 Returns the max number of threads in a block. More...
 
std::string_view xpuid () const
 Get the string used to identify the device. More...
 
int id () const
 Get the device id. More...
 
int device_nr () const
 Get the device number within the backend. More...
 
size_t global_mem_total () const
 Returns the total amount of global memory in bytes. More...
 
size_t global_mem_available () const
 Returns the amount of global memory available in bytes. More...
 

Detailed Description

Device properties.

Constructor & Destructor Documentation

◆ device_prop() [1/2]

xpu::device_prop::device_prop ( )
delete

◆ device_prop() [2/2]

xpu::device_prop::device_prop ( device  )

Query properties of the given device.

Member Function Documentation

◆ arch()

std::string_view xpu::device_prop::arch ( ) const
inline

Returns the architecture of the device, if applicable.

◆ backend()

driver_t xpu::device_prop::backend ( ) const
inline

Get the backend associated with the device.

◆ const_mem_size()

size_t xpu::device_prop::const_mem_size ( ) const
inline

Returns the size of constant memory in bytes.

◆ device_nr()

int xpu::device_prop::device_nr ( ) const
inline

Get the device number within the backend.

◆ global_mem_available()

size_t xpu::device_prop::global_mem_available ( ) const
inline

Returns the amount of global memory available in bytes.

◆ global_mem_total()

size_t xpu::device_prop::global_mem_total ( ) const
inline

Returns the total amount of global memory in bytes.

◆ id()

int xpu::device_prop::id ( ) const
inline

Get the device id.

◆ max_grid_size()

std::array<size_t, 3> xpu::device_prop::max_grid_size ( ) const
inline

Returns the max number of threads in a block.

◆ max_threads_per_block()

size_t xpu::device_prop::max_threads_per_block ( ) const
inline

Returns the max number of threads in a block.

◆ name()

std::string_view xpu::device_prop::name ( ) const
inline

Get the name of the device.

◆ shared_mem_size()

size_t xpu::device_prop::shared_mem_size ( ) const
inline

Returns the size of shared memory per block in bytes.

◆ warp_size()

size_t xpu::device_prop::warp_size ( ) const
inline

Returns the number of threads in a warp.

◆ xpuid()

std::string_view xpu::device_prop::xpuid ( ) const
inline

Get the string used to identify the device.

See also
xpu::settings::device for possible values.

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