23 #ifdef __SYCL_INTERNAL_API
29 #include <type_traits>
36 inline namespace _V1 {
44 template <backend Backend,
class SyclT>
140 explicit context(
const std::vector<device> &DeviceList,
156 explicit context(
const std::vector<device> &DeviceList,
168 #ifdef __SYCL_INTERNAL_API
175 template <
typename Param>
208 #ifdef __SYCL_INTERNAL_API
209 cl_context
get()
const;
216 "is_host() is deprecated as the host device is no longer supported.")
217 bool is_host() const;
236 context(
std::shared_ptr<detail::context_impl> Impl);
240 std::shared_ptr<detail::context_impl> impl;
242 template <
backend Backend, class SyclT>
246 friend decltype(Obj::impl) detail::
getSyclObjImpl(const Obj &SyclObject);
249 friend typename
std::add_pointer_t<typename decltype(T::impl)::element_type>
260 template <>
struct hash<
sycl::context> {
262 return hash<std::shared_ptr<sycl::detail::context_impl>>()(
The context class represents a SYCL context on which kernel functions may be executed.
context & operator=(const context &rhs)=default
bool operator==(const context &rhs) const
context & operator=(context &&rhs)=default
__SYCL2020_DEPRECATED("is_host() is deprecated as the host device is no longer supported.") bool is_host() const
Gets OpenCL interoperability context.
bool operator!=(const context &rhs) const
context(context &&rhs)=default
bool has_property() const noexcept
Checks if this context has a property of type propertyT.
context(const context &rhs)=default
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Objects of the property_list class are containers for the SYCL properties.
std::add_pointer_t< typename decltype(T::impl)::element_type > getRawSyclObjImpl(const T &SyclObject)
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
static constexpr auto get_property()
auto get_native(const SyclObjectT &Obj) -> backend_return_t< BackendName, SyclObjectT >
typename backend_traits< Backend >::template return_type< SyclType > backend_return_t
std::function< void(sycl::exception_list)> async_handler
uintptr_t pi_native_handle
_Abi const simd< _Tp, _Abi > & noexcept
size_t operator()(const sycl::context &Context) const