DPC++ Runtime
Runtime libraries for oneAPI DPC++
pi.hpp File Reference

C++ wrapper of extern "C" PI interfaces. More...

#include <sycl/backend_types.hpp>
#include <sycl/detail/export.hpp>
#include <sycl/detail/os_util.hpp>
#include <sycl/detail/pi.h>
#include <cassert>
#include <cstdint>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include <sycl/detail/pi.def>
Include dependency graph for pi.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::pi::PiFuncInfo< PiApiOffset >
 
struct  sycl::_V1::detail::pi::IsStdVector< T >
 
struct  sycl::_V1::detail::pi::IsStdVector< std::vector< T > >
 

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::detail
 
 sycl::_V1::detail::pi
 

Macros

#define _PI_API(api)   api,
 
#define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME(parameter)    { sycl::detail::pi::handleUnknownParamName(__func__, parameter); }
 
#define _PI_API(api)
 

Typedefs

using sycl::_V1::detail::pi::PiPlugin = ::pi_plugin
 
using sycl::_V1::detail::pi::PiResult = ::pi_result
 
using sycl::_V1::detail::pi::PiPlatform = ::pi_platform
 
using sycl::_V1::detail::pi::PiDevice = ::pi_device
 
using sycl::_V1::detail::pi::PiDeviceType = ::pi_device_type
 
using sycl::_V1::detail::pi::PiDeviceInfo = ::pi_device_info
 
using sycl::_V1::detail::pi::PiDeviceBinaryType = ::pi_device_binary_type
 
using sycl::_V1::detail::pi::PiContext = ::pi_context
 
using sycl::_V1::detail::pi::PiProgram = ::pi_program
 
using sycl::_V1::detail::pi::PiKernel = ::pi_kernel
 
using sycl::_V1::detail::pi::PiQueue = ::pi_queue
 
using sycl::_V1::detail::pi::PiQueueProperties = ::pi_queue_properties
 
using sycl::_V1::detail::pi::PiMem = ::pi_mem
 
using sycl::_V1::detail::pi::PiMemFlags = ::pi_mem_flags
 
using sycl::_V1::detail::pi::PiEvent = ::pi_event
 
using sycl::_V1::detail::pi::PiSampler = ::pi_sampler
 
using sycl::_V1::detail::pi::PiSamplerInfo = ::pi_sampler_info
 
using sycl::_V1::detail::pi::PiSamplerProperties = ::pi_sampler_properties
 
using sycl::_V1::detail::pi::PiSamplerAddressingMode = ::pi_sampler_addressing_mode
 
using sycl::_V1::detail::pi::PiSamplerFilterMode = ::pi_sampler_filter_mode
 
using sycl::_V1::detail::pi::PiMemImageFormat = ::pi_image_format
 
using sycl::_V1::detail::pi::PiMemImageDesc = ::pi_image_desc
 
using sycl::_V1::detail::pi::PiMemImageInfo = ::pi_image_info
 
using sycl::_V1::detail::pi::PiMemObjectType = ::pi_mem_type
 
using sycl::_V1::detail::pi::PiMemImageChannelOrder = ::pi_image_channel_order
 
using sycl::_V1::detail::pi::PiMemImageChannelType = ::pi_image_channel_type
 

Enumerations

enum class  sycl::_V1::detail::PiApiKind { sycl::_V1::detail::_PI_API }
 
enum  sycl::_V1::detail::pi::TraceLevel { sycl::_V1::detail::pi::PI_TRACE_BASIC = 0x1 , sycl::_V1::detail::pi::PI_TRACE_CALLS = 0x2 , sycl::_V1::detail::pi::PI_TRACE_ALL = -1 }
 

Functions

template<sycl::backend BE>
void * sycl::_V1::detail::getPluginOpaqueData (void *opaquedata_arg)
 
bool sycl::_V1::detail::pi::trace (TraceLevel level)
 
void sycl::_V1::detail::pi::die (const char *Message)
 
void sycl::_V1::detail::pi::assertion (bool Condition, const char *Message=nullptr)
 
template<typename T >
void sycl::_V1::detail::pi::handleUnknownParamName (const char *functionName, T parameter)
 
void sycl::_V1::detail::pi::contextSetExtendedDeleter (const sycl::context &constext, pi_context_extended_deleter func, void *user_data)
 
void * sycl::_V1::detail::pi::loadOsLibrary (const std::string &Library)
 
int sycl::_V1::detail::pi::unloadOsLibrary (void *Library)
 
int sycl::_V1::detail::pi::unloadPlugin (void *Library)
 
void * sycl::_V1::detail::pi::getOsLibraryFuncAddress (void *Library, const std::string &FunctionName)
 
std::string sycl::_V1::detail::pi::platformInfoToString (pi_platform_info info)
 
template<class To , class From >
To sycl::_V1::detail::pi::cast (From value)
 
std::vector< plugin > & sycl::_V1::detail::pi::initialize ()
 
template<backend BE>
const plugin & sycl::_V1::detail::pi::getPlugin ()
 
uint64_t sycl::_V1::detail::pi::emitFunctionBeginTrace (const char *FName)
 Emits an XPTI trace before a PI API call is made. More...
 
void sycl::_V1::detail::pi::emitFunctionEndTrace (uint64_t CorrelationID, const char *FName)
 Emits an XPTI trace after the PI API call has been made. More...
 
uint64_t sycl::_V1::detail::pi::emitFunctionWithArgsBeginTrace (uint32_t FuncID, const char *FName, unsigned char *ArgsData, pi_plugin Plugin)
 Notifies XPTI subscribers about PI function calls and packs call arguments. More...
 
void sycl::_V1::detail::pi::emitFunctionWithArgsEndTrace (uint64_t CorrelationID, uint32_t FuncID, const char *FName, unsigned char *ArgsData, pi_result Result, pi_plugin Plugin)
 Notifies XPTI subscribers about PI function call result. More...
 
PiDeviceBinaryType sycl::_V1::detail::pi::getBinaryImageFormat (const unsigned char *ImgData, size_t ImgSize)
 Tries to determine the device binary image foramat. More...
 
template<class To , class FromE >
To sycl::_V1::detail::pi::cast (std::vector< FromE > Values)
 

Variables

std::shared_ptr< plugin > sycl::_V1::detail::pi::GlobalPlugin
 

Detailed Description

C++ wrapper of extern "C" PI interfaces.

Definition in file pi.hpp.

Macro Definition Documentation

◆ __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME

#define __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME (   parameter)     { sycl::detail::pi::handleUnknownParamName(__func__, parameter); }

Definition at line 104 of file pi.hpp.

◆ _PI_API [1/2]

#define _PI_API (   api)    api,

Definition at line 174 of file pi.hpp.

◆ _PI_API [2/2]

#define _PI_API (   api)
Value:
template <> struct PiFuncInfo<PiApiKind::api> { \
using FuncPtrT = decltype(&::api); \
inline const char *getFuncName() { return #api; } \
inline FuncPtrT getFuncPtr(PiPlugin MPlugin) { \
return MPlugin.PiFunctionTable.api; \
} \
};
::pi_plugin PiPlugin
Definition: pi.hpp:107

Definition at line 174 of file pi.hpp.