DPC++ Runtime
Runtime libraries for oneAPI DPC++
_pi_device Struct Reference

PI device mapping to a CUdevice. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_device:

Public Member Functions

 _pi_device (native_type cuDevice, CUcontext cuContext, CUevent evBase, pi_platform platform)
 
 ~_pi_device ()
 
native_type get () const noexcept
 
CUcontext get_context () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_platform get_platform () const noexcept
 
pi_uint64 get_elapsed_time (CUevent) const
 
void save_max_work_item_sizes (size_t size, size_t *save_max_work_item_sizes) noexcept
 
void save_max_work_group_size (int value) noexcept
 
void get_max_work_item_sizes (size_t ret_size, size_t *ret_max_work_item_sizes) const noexcept
 
int get_max_work_group_size () const noexcept
 
 _pi_device (pi_platform ArgPlt, cm_support::CmDevice *ArgCmDev, std::string ArgVersionStr)
 
 _pi_device (native_type cuDevice, pi_platform platform)
 
native_type get () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
pi_platform get_platform () const noexcept
 
void set_context (pi_context ctx)
 
pi_context get_context ()
 

Public Attributes

pi_platform Platform
 
cm_support::CmDevice * CmDevicePtr = nullptr
 
std::string VersionStr
 

Detailed Description

PI device mapping to a CUdevice.

PI device mapping to a hipDevice_t.

Includes an observer pointer to the platform, and implements the reference counting semantics since CUDA objects are not refcounted.

Includes an observer pointer to the platform, and implements the reference counting semantics since HIP objects are not refcounted.

Definition at line 83 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ _pi_device() [1/3]

_pi_device::_pi_device ( native_type  cuDevice,
CUcontext  cuContext,
CUevent  evBase,
pi_platform  platform 
)
inline

Definition at line 98 of file pi_cuda.hpp.

◆ ~_pi_device()

_pi_device::~_pi_device ( )
inline

Definition at line 103 of file pi_cuda.hpp.

◆ _pi_device() [2/3]

_pi_device::_pi_device ( pi_platform  ArgPlt,
cm_support::CmDevice *  ArgCmDev,
std::string  ArgVersionStr 
)
inline

Definition at line 82 of file pi_esimd_emulator.hpp.

◆ _pi_device() [3/3]

_pi_device::_pi_device ( native_type  cuDevice,
pi_platform  platform 
)
inline

Definition at line 87 of file pi_hip.hpp.

Member Function Documentation

◆ get() [1/2]

native_type _pi_device::get ( ) const
inlinenoexcept

Definition at line 90 of file pi_hip.hpp.

◆ get() [2/2]

◆ get_context() [1/2]

pi_context _pi_device::get_context ( )
inline

Definition at line 98 of file pi_hip.hpp.

◆ get_context() [2/2]

CUcontext _pi_device::get_context ( ) const
inlinenoexcept

Definition at line 107 of file pi_cuda.hpp.

Referenced by _pi_context::_pi_context().

◆ get_elapsed_time()

pi_uint64 _pi_device::get_elapsed_time ( CUevent  ev) const

◆ get_max_work_group_size()

int _pi_device::get_max_work_group_size ( ) const
inlinenoexcept

Definition at line 129 of file pi_cuda.hpp.

Referenced by cuda_piEnqueueKernelLaunch().

◆ get_max_work_item_sizes()

void _pi_device::get_max_work_item_sizes ( size_t  ret_size,
size_t *  ret_max_work_item_sizes 
) const
inlinenoexcept

Definition at line 124 of file pi_cuda.hpp.

References sycl::_V1::detail::memcpy().

Referenced by cuda_piEnqueueKernelLaunch().

◆ get_platform() [1/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 94 of file pi_hip.hpp.

◆ get_platform() [2/2]

pi_platform _pi_device::get_platform ( ) const
inlinenoexcept

Definition at line 111 of file pi_cuda.hpp.

◆ get_reference_count() [1/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 92 of file pi_hip.hpp.

◆ get_reference_count() [2/2]

pi_uint32 _pi_device::get_reference_count ( ) const
inlinenoexcept

Definition at line 109 of file pi_cuda.hpp.

◆ save_max_work_group_size()

void _pi_device::save_max_work_group_size ( int  value)
inlinenoexcept

Definition at line 120 of file pi_cuda.hpp.

◆ save_max_work_item_sizes()

void _pi_device::save_max_work_item_sizes ( size_t  size,
size_t *  save_max_work_item_sizes 
)
inlinenoexcept

Definition at line 115 of file pi_cuda.hpp.

References sycl::_V1::detail::memcpy().

◆ set_context()

void _pi_device::set_context ( pi_context  ctx)
inline

Definition at line 96 of file pi_hip.hpp.

Member Data Documentation

◆ CmDevicePtr

cm_support::CmDevice* _pi_device::CmDevicePtr = nullptr

◆ Platform

pi_platform _pi_device::Platform

Definition at line 86 of file pi_esimd_emulator.hpp.

◆ VersionStr

std::string _pi_device::VersionStr

Definition at line 91 of file pi_esimd_emulator.hpp.


The documentation for this struct was generated from the following files: