DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
26 detail::pi::cast<detail::RT::PiPlatform>(PlatformId),
27 detail::RT::getPlugin<backend::opencl>());
36 bool platform::has_extension(
const std::string &ExtensionName)
const {
37 return impl->has_extension(ExtensionName);
40 bool platform::is_host()
const {
return impl->is_host(); }
43 return impl->get_devices(DeviceType);
52 template <info::platform param>
55 return impl->get_info<param>();
62 #define __SYCL_PARAM_TRAITS_SPEC(param_type, param, ret_type) \
63 template __SYCL_EXPORT ret_type \
64 platform::get_info<info::param_type::param>() const;
66 #include <CL/sycl/info/platform_traits.def>
68 #undef __SYCL_PARAM_TRAITS_SPEC
72 throw std::runtime_error(
"SYCL default contexts are not enabled");
76 std::unordered_map<detail::PlatformImplPtr, detail::ContextImplPtr>
77 &PlatformToDefaultContextCache =
83 auto It = PlatformToDefaultContextCache.find(impl);
84 if (PlatformToDefaultContextCache.end() == It)
85 std::tie(It, std::ignore) = PlatformToDefaultContextCache.insert(
88 return detail::createSyclObjFromImpl<context>(It->second);
The device_selector class provides ability to choose the best SYCL device based on heuristics specifi...
static GlobalHandler & instance()
virtual device select_device() const
platform get_platform() const
Get associated SYCL platform.
backend getImplBackend(const T &Impl)
We provide new interfaces for matrix muliply in this patch:
uintptr_t pi_native_handle
constexpr tuple_element< I, tuple< Types... > >::type & get(cl::sycl::detail::tuple< Types... > &Arg) noexcept
std::unordered_map< PlatformImplPtr, ContextImplPtr > & getPlatformToDefaultContextCache()
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
std::mutex & getPlatformToDefaultContextCacheMutex()
The context class represents a SYCL context on which kernel functions may be executed.
#define __SYCL_INLINE_NAMESPACE(X)