DPC++ Runtime
Runtime libraries for oneAPI DPC++
syclcompat::detail::dev_mgr Class Reference

device manager More...

#include <syclcompat/device.hpp>

Public Member Functions

device_extcurrent_device ()
 
device_extcpu_device () const
 
device_extget_device (unsigned int id) const
 
unsigned int current_device_id () const
 
void select_device (unsigned int id)
 Select device with a device ID. More...
 
unsigned int device_count ()
 
unsigned int get_device_id (const sycl::device &dev)
 
template<class DeviceSelector >
std::enable_if_t< std::is_invocable_r_v< int, DeviceSelector, const sycl::device & > > select_device (const DeviceSelector &selector=sycl::gpu_selector_v)
 Select device with a Device Selector. More...
 
 dev_mgr (const dev_mgr &)=delete
 
dev_mgroperator= (const dev_mgr &)=delete
 
 dev_mgr (dev_mgr &&)=delete
 
dev_mgroperator= (dev_mgr &&)=delete
 

Static Public Member Functions

static dev_mgrinstance ()
 Returns the instance of device manager singleton. More...
 

Detailed Description

device manager

Definition at line 626 of file device.hpp.

Constructor & Destructor Documentation

◆ dev_mgr() [1/2]

syclcompat::detail::dev_mgr::dev_mgr ( const dev_mgr )
delete

◆ dev_mgr() [2/2]

syclcompat::detail::dev_mgr::dev_mgr ( dev_mgr &&  )
delete

Member Function Documentation

◆ cpu_device()

device_ext& syclcompat::detail::dev_mgr::cpu_device ( ) const
inline

Definition at line 633 of file device.hpp.

Referenced by syclcompat::cpu_device().

◆ current_device()

◆ current_device_id()

unsigned int syclcompat::detail::dev_mgr::current_device_id ( ) const
inline

Definition at line 646 of file device.hpp.

References syclcompat::detail::get_tid().

Referenced by current_device(), and syclcompat::get_current_device_id().

◆ device_count()

unsigned int syclcompat::detail::dev_mgr::device_count ( )
inline

Definition at line 662 of file device.hpp.

◆ get_device()

device_ext& syclcompat::detail::dev_mgr::get_device ( unsigned int  id) const
inline

Definition at line 641 of file device.hpp.

Referenced by syclcompat::get_device().

◆ get_device_id()

unsigned int syclcompat::detail::dev_mgr::get_device_id ( const sycl::device dev)
inline

Definition at line 664 of file device.hpp.

Referenced by syclcompat::get_device_id(), and select_device().

◆ instance()

◆ operator=() [1/2]

dev_mgr& syclcompat::detail::dev_mgr::operator= ( const dev_mgr )
delete

◆ operator=() [2/2]

dev_mgr& syclcompat::detail::dev_mgr::operator= ( dev_mgr &&  )
delete

◆ select_device() [1/2]

template<class DeviceSelector >
std::enable_if_t< std::is_invocable_r_v<int, DeviceSelector, const sycl::device &> > syclcompat::detail::dev_mgr::select_device ( const DeviceSelector &  selector = sycl::gpu_selector_v)
inline

Select device with a Device Selector.

Parameters
selectordevice selector to get the device id from. Defaults to sycl::gpu_selector_v

Definition at line 681 of file device.hpp.

References get_device_id(), and select_device().

◆ select_device() [2/2]

void syclcompat::detail::dev_mgr::select_device ( unsigned int  id)
inline

Select device with a device ID.

Parameters
[in]idThe id of the device which can be obtained through get_device_id(const sycl::device).

Definition at line 657 of file device.hpp.

References syclcompat::detail::get_tid().

Referenced by select_device(), and syclcompat::select_device().


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