DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
30 template <backend BackendName,
class SyclObjectT>
32 -> backend_return_t<BackendName, SyclObjectT>;
40 namespace ext::oneapi {
42 class filter_selector;
58 #ifdef __SYCL_INTERNAL_API
59 explicit device(cl_device_id DeviceId);
67 "use SYCL 2020 device selectors instead.")
74 template <
typename DeviceSelector,
77 explicit device(
const DeviceSelector &deviceSelector)
96 #ifdef __SYCL_INTERNAL_API
97 cl_device_id
get()
const;
104 "is_host() is deprecated as the host device is no longer supported.")
105 bool is_host() const;
120 bool is_accelerator() const;
146 std::vector<
device> create_sub_devices(
size_t ComputeUnits) const;
160 create_sub_devices(const
std::vector<
size_t> &Counts) const;
190 std::vector<
device> create_sub_devices() const;
200 template <typename Param>
201 typename detail::is_device_info_desc<Param>::return_type get_info() const;
224 backend get_backend() const noexcept;
232 bool has(aspect Aspect) const;
235 std::shared_ptr<detail::device_impl> impl;
236 device(
std::shared_ptr<detail::device_impl> impl) : impl(impl) {}
251 template <backend BackendName,
class SyclObjectT>
252 friend auto get_native(
const SyclObjectT &Obj)
253 -> backend_return_t<BackendName, SyclObjectT>;
260 template <>
struct hash<
sycl::device> {
262 return hash<std::shared_ptr<sycl::detail::device_impl>>()(
partition_affinity_domain
signed char __SYCL2020_DEPRECATED
bool has_extension(const sycl::platform &SyclPlatform, const std::string &Extension)
#define __SYCL_INLINE_VER_NAMESPACE(X)
bool operator!=(const device &rhs) const
---— Error handling, matching OpenCL plugin semantics.
detail::add_pointer_t< typename decltype(T::impl)::element_type > getRawSyclObjImpl(const T &SyclObject)
auto getDeviceComparisonLambda()
constexpr tuple_element< I, tuple< Types... > >::type & get(sycl::detail::tuple< Types... > &Arg) noexcept
device(const DeviceSelector &deviceSelector)
Constructs a SYCL device instance using the device identified by the device selector provided.
annotated_arg & operator=(annotated_arg &)=default
size_t operator()(const sycl::device &Device) const
bool operator==(const device &rhs) const
device select_device(const DSelectorInvocableType &DeviceSelectorInvocable)
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
uintptr_t pi_native_handle
typename std::add_pointer< T >::type add_pointer_t
auto get_native(const SyclObjectT &Obj) -> backend_return_t< BackendName, SyclObjectT >
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
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)