The plugin class provides a unified interface to the underlying low-level runtimes for the device-agnostic SYCL runtime. More...
#include <detail/plugin.hpp>
Public Member Functions | |
plugin ()=delete | |
plugin (const std::shared_ptr< sycl::detail::pi::PiPlugin > &Plugin, backend UseBackend, void *LibraryHandle) | |
plugin & | operator= (const plugin &)=delete |
plugin (const plugin &)=delete | |
plugin & | operator= (plugin &&other) noexcept=delete |
plugin (plugin &&other) noexcept=delete | |
~plugin ()=default | |
const sycl::detail::pi::PiPlugin & | getPiPlugin () const |
sycl::detail::pi::PiPlugin & | getPiPlugin () |
const std::shared_ptr< sycl::detail::pi::PiPlugin > & | getPiPluginPtr () const |
template<typename Exception = sycl::runtime_error> | |
void | checkPiResult (sycl::detail::pi::PiResult pi_result) const |
Checks return value from PI calls. More... | |
template<sycl::errc errc> | |
void | checkPiResult (sycl::detail::pi::PiResult pi_result) const |
void | reportPiError (sycl::detail::pi::PiResult pi_result, const char *context) const |
template<PiApiKind PiApiOffset, typename... ArgsT> | |
sycl::detail::pi::PiResult | call_nocheck (ArgsT... Args) const |
Calls the PiApi, traces the call, and returns the result. More... | |
template<PiApiKind PiApiOffset, typename... ArgsT> | |
void | call (ArgsT... Args) const |
Calls the API, traces the call, checks the result. More... | |
template<sycl::errc errc, PiApiKind PiApiOffset, typename... ArgsT> | |
void | call (ArgsT... Args) const |
bool | hasBackend (backend Backend) const |
Tells if this plugin can serve specified backend. More... | |
void * | getLibraryHandle () const |
void * | getLibraryHandle () |
int | unload () |
int | getPlatformId (sycl::detail::pi::PiPlatform Platform) |
int | getStartingDeviceId (sycl::detail::pi::PiPlatform Platform) |
void | setLastDeviceId (sycl::detail::pi::PiPlatform Platform, int Id) |
void | adjustLastDeviceId (sycl::detail::pi::PiPlatform Platform) |
bool | containsPiPlatform (sycl::detail::pi::PiPlatform Platform) |
std::shared_ptr< std::mutex > | getPluginMutex () |
Public Attributes | |
bool | pluginReleased = false |
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agnostic SYCL runtime.
Definition at line 90 of file plugin.hpp.
|
delete |
|
inline |
Definition at line 93 of file plugin.hpp.
|
delete |
|
deletenoexcept |
|
default |
|
inline |
Definition at line 291 of file plugin.hpp.
References getPlatformId().
|
inline |
Calls the API, traces the call, checks the result.
sycl::runtime_exception | if the call was not successful. |
Definition at line 232 of file plugin.hpp.
References checkPiResult().
|
inline |
sycl::exceptions(errc) | if the call was not successful. |
Definition at line 239 of file plugin.hpp.
|
inline |
Calls the PiApi, traces the call, and returns the result.
Usage:
Definition at line 173 of file plugin.hpp.
References std::cout, sycl::_V1::detail::pi::emitFunctionBeginTrace(), sycl::_V1::detail::pi::emitFunctionEndTrace(), sycl::_V1::detail::pi::emitFunctionWithArgsBeginTrace(), sycl::_V1::detail::pi::emitFunctionWithArgsEndTrace(), sycl::_V1::detail::pi::PI_TRACE_CALLS, pluginReleased, sycl::_V1::detail::pi::printArgs(), sycl::_V1::detail::pi::printOuts(), and sycl::_V1::detail::pi::trace().
|
inline |
Checks return value from PI calls.
Exception | if pi_result is not a PI_SUCCESS. |
Definition at line 117 of file plugin.hpp.
References __SYCL_CHECK_OCL_CODE_THROW, and std::clog.
Referenced by call().
|
inline |
SYCL | 2020 exception(errc) if pi_result is not PI_SUCCESS |
Definition at line 135 of file plugin.hpp.
References __SYCL_CHECK_CODE_THROW_VIA_ERRC, and std::clog.
|
inline |
Definition at line 298 of file plugin.hpp.
|
inline |
Definition at line 250 of file plugin.hpp.
|
inline |
Definition at line 249 of file plugin.hpp.
|
inline |
Definition at line 108 of file plugin.hpp.
|
inline |
Definition at line 107 of file plugin.hpp.
|
inline |
Definition at line 109 of file plugin.hpp.
|
inline |
Definition at line 259 of file plugin.hpp.
Referenced by adjustLastDeviceId(), getStartingDeviceId(), and setLastDeviceId().
|
inline |
Definition at line 303 of file plugin.hpp.
|
inline |
Definition at line 274 of file plugin.hpp.
References getPlatformId().
Tells if this plugin can serve specified backend.
For example, Unified Runtime plugin will be able to serve multiple backends as determined by the platforms reported by the plugin.
Definition at line 247 of file plugin.hpp.
|
inline |
Definition at line 151 of file plugin.hpp.
References sycl::_V1::detail::codeToString().
|
inline |
Definition at line 283 of file plugin.hpp.
References getPlatformId().
|
inline |
Definition at line 251 of file plugin.hpp.
References pluginReleased, and sycl::_V1::detail::pi::unloadPlugin().
bool sycl::_V1::detail::plugin::pluginReleased = false |
Definition at line 304 of file plugin.hpp.
Referenced by call_nocheck(), and unload().