DPC++ Runtime
Runtime libraries for oneAPI DPC++
plugin.hpp File Reference
#include <detail/config.hpp>
#include <detail/plugin_printers.hpp>
#include <memory>
#include <mutex>
#include <sycl/backend_types.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/pi.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/iostream_proxy.hpp>
#include <sycl/detail/pi.def>
Include dependency graph for plugin.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::detail::array_fill_helper< Kind, Idx, T >
 
struct  sycl::_V1::detail::array_fill_helper< Kind, Idx, T, Args... >
 
class  sycl::_V1::detail::plugin
 The plugin class provides a unified interface to the underlying low-level runtimes for the device-agnostic SYCL runtime. More...
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Macros

#define __SYCL_REPORT_PI_ERR_TO_STREAM(expr)
 
#define __SYCL_REPORT_PI_ERR_TO_EXC(expr, exc, str)
 
#define __SYCL_REPORT_ERR_TO_EXC_VIA_ERRC(expr, errc)
 
#define __SYCL_CHECK_OCL_CODE_THROW(X, EXC, STR)    __SYCL_REPORT_PI_ERR_TO_EXC(X, EXC, STR)
 
#define __SYCL_CHECK_OCL_CODE_NO_EXC(X)   __SYCL_REPORT_PI_ERR_TO_STREAM(X)
 
#define __SYCL_CHECK_CODE_THROW_VIA_ERRC(X, ERRC)    __SYCL_REPORT_ERR_TO_EXC_VIA_ERRC(X, ERRC)
 
#define _PI_API(api)
 

Functions

template<typename... Ts>
constexpr size_t sycl::_V1::detail::totalSize (const std::tuple< Ts... > &)
 
template<PiApiKind Kind, typename... ArgsT>
auto sycl::_V1::detail::packCallArguments (ArgsT &&...Args)
 

Macro Definition Documentation

◆ __SYCL_CHECK_CODE_THROW_VIA_ERRC

#define __SYCL_CHECK_CODE_THROW_VIA_ERRC (   X,
  ERRC 
)     __SYCL_REPORT_ERR_TO_EXC_VIA_ERRC(X, ERRC)

Definition at line 61 of file plugin.hpp.

◆ __SYCL_CHECK_OCL_CODE_NO_EXC

#define __SYCL_CHECK_OCL_CODE_NO_EXC (   X)    __SYCL_REPORT_PI_ERR_TO_STREAM(X)

Definition at line 59 of file plugin.hpp.

◆ __SYCL_CHECK_OCL_CODE_THROW

#define __SYCL_CHECK_OCL_CODE_THROW (   X,
  EXC,
  STR 
)     __SYCL_REPORT_PI_ERR_TO_EXC(X, EXC, STR)

Definition at line 57 of file plugin.hpp.

◆ __SYCL_REPORT_ERR_TO_EXC_VIA_ERRC

#define __SYCL_REPORT_ERR_TO_EXC_VIA_ERRC (   expr,
  errc 
)
Value:
{ \
auto code = expr; \
if (code != PI_SUCCESS) { \
} \
}
#define __SYCL_PI_ERROR_REPORT
Definition: common.hpp:162
std::string codeToString(pi_int32 code)
Definition: exception.hpp:62
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
Definition: exception.cpp:93

Definition at line 47 of file plugin.hpp.

◆ __SYCL_REPORT_PI_ERR_TO_EXC

#define __SYCL_REPORT_PI_ERR_TO_EXC (   expr,
  exc,
  str 
)
Value:
{ \
auto code = expr; \
if (code != PI_SUCCESS) { \
std::string err_str = \
str ? "\n" + std::string(str) + "\n" : std::string{}; \
err_str, \
code); \
} \
}

Definition at line 35 of file plugin.hpp.

◆ __SYCL_REPORT_PI_ERR_TO_STREAM

#define __SYCL_REPORT_PI_ERR_TO_STREAM (   expr)
Value:
{ \
auto code = expr; \
if (code != PI_SUCCESS) { \
<< std::endl; \
} \
}
__SYCL_EXTERN_STREAM_ATTRS ostream cerr
Linked to standard error (unbuffered)

Definition at line 26 of file plugin.hpp.

◆ _PI_API

#define _PI_API (   api)
Value:
template <> struct PiApiArgTuple<PiApiKind::api> { \
using type = typename function_traits<decltype(api)>::args_type; \
};

Definition at line 79 of file plugin.hpp.