30 #include <type_traits>
36 inline namespace _V1 {
39 template <backend BackendName,
class SyclObjectT>
41 -> backend_return_t<BackendName, SyclObjectT>;
49 namespace ext::oneapi {
51 class filter_selector;
73 #ifdef __SYCL_INTERNAL_API
74 explicit device(cl_device_id DeviceId);
82 "use SYCL 2020 device selectors instead.")
89 template <typename DeviceSelector,
92 explicit
device(const DeviceSelector &deviceSelector)
107 void ext_oneapi_enable_peer_access(
const device &peer);
108 void ext_oneapi_disable_peer_access(
const device &peer);
110 ext_oneapi_can_access_peer(
const device &peer,
118 #ifdef __SYCL_INTERNAL_API
119 cl_device_id
get()
const;
126 "is_host() is deprecated as the host device is no longer supported.")
127 bool is_host() const;
142 bool is_accelerator() const;
168 std::vector<
device> create_sub_devices(
size_t ComputeUnits) const;
182 create_sub_devices(const
std::vector<
size_t> &Counts) const;
212 std::vector<
device> create_sub_devices() const;
222 template <typename Param>
223 typename detail::is_device_info_desc<Param>::return_type get_info()
const {
230 template <
typename Param>
232 get_backend_info()
const;
261 #if defined(__clang__)
262 #pragma clang diagnostic push
263 #pragma clang diagnostic ignored "-Wgcc-compat"
314 bool ext_oneapi_supports_cl_c_feature(
const std::string &Feature);
323 bool ext_oneapi_supports_cl_c_version(
332 bool ext_oneapi_supports_cl_extension(
333 const std::string &name,
344 std::string ext_oneapi_cl_profile()
const;
347 #if defined(__clang__)
348 #pragma clang diagnostic pop
352 std::shared_ptr<detail::device_impl> impl;
353 device(std::shared_ptr<detail::device_impl> impl) : impl(impl) {}
361 friend typename std::add_pointer_t<
typename decltype(T::impl)::element_type>
367 template <backend BackendName,
class SyclObjectT>
368 friend auto get_native(
const SyclObjectT &Obj)
371 template <
typename Param>
374 get_info_impl()
const;
381 template <>
struct hash<
sycl::device> {
383 return hash<std::shared_ptr<sycl::detail::device_impl>>()(
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
device(device &&rhs)=default
__SYCL2020_DEPRECATED("SYCL 1.2.1 device selectors are deprecated. Please " "use SYCL 2020 device selectors instead.") explicit device(const device_selector &DeviceSelector)
Constructs a SYCL device instance from an OpenCL cl_device_id in accordance with the requirements des...
device & operator=(const device &rhs)=default
device & operator=(device &&rhs)=default
__SYCL2020_DEPRECATED("is_host() is deprecated as the host device is no longer supported.") bool is_host() const
Get instance of device.
device(const device &rhs)=default
bool operator!=(const device &rhs) const
bool operator==(const device &rhs) const
#define __SYCL_WARN_IMAGE_ASPECT(aspect)
std::add_pointer_t< typename decltype(T::impl)::element_type > getRawSyclObjImpl(const T &SyclObject)
auto getDeviceComparisonLambda()
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
auto convert_from_abi_neutral(ParamT &&Info)
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
typename ABINeutralT< T >::type ABINeutralT_t
std::enable_if_t< std::is_invocable_r_v< int, DeviceSelector &, const device & > &&!std::is_base_of_v< ext::oneapi::filter_selector, DeviceSelector > &&!std::is_base_of_v< device_selector, DeviceSelector > > EnableIfSYCL2020DeviceSelectorInvocable
partition_affinity_domain
bool has_extension(const sycl::platform &SyclPlatform, const std::string &Extension)
signed char __SYCL2020_DEPRECATED
auto get_native(const SyclObjectT &Obj) -> backend_return_t< BackendName, SyclObjectT >
typename backend_traits< Backend >::template return_type< SyclType > backend_return_t
static std::enable_if_t< std::is_invocable_r_v< int, DeviceSelector, const sycl::device & > > select_device(const DeviceSelector &selector=sycl::gpu_selector_v)
uintptr_t pi_native_handle
_Abi const simd< _Tp, _Abi > & noexcept
size_t operator()(const sycl::device &Device) const