22 #ifdef __SYCL_INTERNAL_API
28 #include <type_traits>
35 inline namespace _V1 {
43 template <backend Backend,
class SyclT>
139 explicit context(
const std::vector<device> &DeviceList,
155 explicit context(
const std::vector<device> &DeviceList,
167 #ifdef __SYCL_INTERNAL_API
174 template <
typename Param>
180 template <
typename Param>
182 get_backend_info()
const;
200 return getPropList().template has_property<propertyT>();
210 return getPropList().template get_property<propertyT>();
218 #ifdef __SYCL_INTERNAL_API
219 cl_context
get()
const;
239 context(
std::shared_ptr<detail::context_impl> Impl);
241 ur_native_handle_t getNative() const;
243 std::shared_ptr<detail::context_impl> impl;
245 template <
backend Backend, class SyclT>
249 friend const decltype(Obj::impl) &
261 const
std::
string &WhatArg)
272 const std::error_category &ECat,
274 :
exception(Ctx, {EV, ECat}, std::string(WhatArg)) {}
277 const std::error_category &ECat,
278 const std::string &WhatArg)
282 const std::error_category &ECat)
289 template <>
struct hash<
sycl::context> {
291 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
propertyT get_property() const
Gets the specified property of this context.
bool operator==(const context &rhs) const
context & operator=(context &&rhs)=default
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.
exception(std::error_code, const char *Msg)
Objects of the property_list class are containers for the SYCL properties.
decltype(Obj::impl) const & getSyclObjImpl(const Obj &SyclObject)
T createSyclObjFromImpl(decltype(T::impl) ImplObj)
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
_Abi const simd< _Tp, _Abi > & noexcept
size_t operator()(const sycl::context &Context) const