DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
22 inline namespace _V1 {
45 const std::shared_ptr<plugin> &APlugin)
46 : MPlatform(APlatform), MPlugin(APlugin) {
79 template <
typename Param>
typename Param::return_type
get_info()
const;
82 bool is_host()
const {
return MHostPlatform; };
89 const char **backend_option)
const {
93 MPlatform, frontend_option, backend_option);
94 Plugin->checkPiResult(Err);
98 cl_platform_id
get()
const {
100 throw invalid_object_error(
101 "This instance of platform doesn't support OpenCL interoperability.",
102 PI_ERROR_INVALID_PLATFORM);
104 return pi::cast<cl_platform_id>(MPlatform);
116 throw invalid_object_error(
"This instance of platform is a host instance",
117 PI_ERROR_INVALID_PLATFORM);
133 assert(!MHostPlatform &&
"Plugin is not available for Host.");
142 assert(!MHostPlatform &&
"Plugin is not available for Host");
160 bool has(aspect Aspect)
const;
168 std::shared_ptr<device_impl>
180 std::shared_ptr<device_impl>
182 const std::shared_ptr<platform_impl> &PlatformImpl);
199 static std::shared_ptr<platform_impl>
212 static std::shared_ptr<platform_impl>
221 std::shared_ptr<device_impl>
225 template <
typename ListT,
typename FilterT>
227 filterDeviceFilter(std::vector<sycl::detail::pi::PiDevice> &PiDevices,
228 ListT *FilterList)
const;
230 bool MHostPlatform =
false;
235 std::vector<std::weak_ptr<device_impl>> MDeviceCache;
236 std::mutex MDeviceMapMutex;
backend convertBackend(pi_platform_backend PiBackend)
pi_result piPlatformGetInfo(pi_platform platform, pi_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
---— Error handling, matching OpenCL plugin semantics.
uintptr_t pi_native_handle
@ PI_EXT_PLATFORM_INFO_BACKEND
::pi_platform_backend PiPlatformBackend
pi_result piPluginGetBackendOption(pi_platform platform, const char *frontend_option, const char **backend_option)
API to get backend specific option.
std::shared_ptr< plugin > PluginPtr