DPC++ Runtime
Runtime libraries for oneAPI DPC++
device.hpp File Reference
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <mutex>
#include <set>
#include <sstream>
#include <thread>
#include <vector>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/exception_list.hpp>
#include <sycl/properties/queue_properties.hpp>
#include <sycl/queue.hpp>
#include <sycl/info/aspects.def>
#include <sycl/info/aspects_deprecated.def>
Include dependency graph for device.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  syclcompat::device_info
 
class  syclcompat::device_ext
 device extension More...
 
class  syclcompat::detail::dev_mgr
 device manager More...
 

Namespaces

 syclcompat
 
 syclcompat::detail
 Atomic extension to implement standard APIs in std::atomic.
 

Macros

#define __SYCL_ASPECT(ASPECT, ID)
 
#define __SYCL_ASPECT_DEPRECATED(ASPECT, ID, MESSAGE)   __SYCL_ASPECT(ASPECT, ID)
 
#define __SYCL_ASPECT_DEPRECATED_ALIAS(ASPECT, ID, MESSAGE)
 

Typedefs

using syclcompat::event_ptr = sycl::event *
 
using syclcompat::queue_ptr = sycl::queue *
 
using syclcompat::device_ptr = char *
 

Functions

static void syclcompat::destroy_event (event_ptr event)
 Destroy event pointed memory. More...
 
static unsigned int syclcompat::detail::get_tid ()
 
static sycl::queue syclcompat::create_queue (bool print_on_async_exceptions=false, bool in_order=true)
 
static sycl::queue syclcompat::get_default_queue ()
 Util function to get the default queue of current device in device manager. More...
 
static void syclcompat::set_default_queue (const sycl::queue &q)
 Util function to change the default queue of the current device in the device manager If the device extension saved queue is the default queue, the previous saved queue will be overwritten as well. More...
 
static void syclcompat::wait (sycl::queue q=get_default_queue())
 
static void syclcompat::wait_and_throw (sycl::queue q=get_default_queue())
 
static unsigned int syclcompat::get_current_device_id ()
 Util function to get the id of current device in device manager. More...
 
static device_ext & syclcompat::get_current_device ()
 Util function to get the current device. More...
 
static device_ext & syclcompat::get_device (unsigned int id)
 Util function to get a device by id. More...
 
static sycl::context syclcompat::get_default_context ()
 Util function to get the context of the default queue of current device in device manager. More...
 
static device_ext & syclcompat::cpu_device ()
 Util function to get a CPU device. More...
 
static unsigned int syclcompat::select_device (unsigned int id)
 
template<class DeviceSelector >
static std::enable_if_t< std::is_invocable_r_v< int, DeviceSelector, const sycl::device & > > syclcompat::select_device (const DeviceSelector &selector=sycl::gpu_selector_v)
 
static unsigned int syclcompat::get_device_id (const sycl::device &dev)
 

Variables

auto syclcompat::detail::exception_handler
 SYCL default exception handler. More...
 

Macro Definition Documentation

◆ __SYCL_ASPECT

#define __SYCL_ASPECT (   ASPECT,
  ID 
)
Value:
case sycl::aspect::ASPECT: \
return #ASPECT;

◆ __SYCL_ASPECT_DEPRECATED

#define __SYCL_ASPECT_DEPRECATED (   ASPECT,
  ID,
  MESSAGE 
)    __SYCL_ASPECT(ASPECT, ID)

◆ __SYCL_ASPECT_DEPRECATED_ALIAS

#define __SYCL_ASPECT_DEPRECATED_ALIAS (   ASPECT,
  ID,
  MESSAGE 
)