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

Implementation of PI Program on CUDA Module object. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_program:

Public Types

using native_type = CUmodule
 
using native_type = hipModule_t
 

Public Member Functions

 _pi_program (pi_context ctxt)
 
 ~_pi_program ()
 
pi_result set_metadata (const pi_device_binary_property *metadata, size_t length)
 
pi_result set_binary (const char *binary, size_t binarySizeInBytes)
 
pi_result build_program (const char *build_options)
 
pi_context get_context () const
 
native_type get () const noexcept
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 
 _pi_program ()
 
 _pi_program (pi_context ctxt)
 
 ~_pi_program ()
 
pi_result set_binary (const char *binary, size_t binarySizeInBytes)
 
pi_result build_program (const char *build_options)
 
pi_context get_context () const
 
native_type get () const noexcept
 
pi_uint32 increment_reference_count () noexcept
 
pi_uint32 decrement_reference_count () noexcept
 
pi_uint32 get_reference_count () const noexcept
 

Public Attributes

native_type module_
 
const char * binary_
 
size_t binarySizeInBytes_
 
std::atomic_uint32_t refCount_
 
_pi_contextcontext_
 
std::unordered_map< std::string, std::tuple< uint32_t, uint32_t, uint32_t > > kernelReqdWorkGroupSizeMD_
 
std::unordered_map< std::string, std::string > globalIDMD_
 
char errorLog_ [MAX_LOG_SIZE]
 
char infoLog_ [MAX_LOG_SIZE]
 
std::string buildOptions_
 
pi_program_build_status buildStatus_ = PI_PROGRAM_BUILD_STATUS_NONE
 
pi_context Context
 

Static Public Attributes

constexpr static size_t MAX_LOG_SIZE = 8192u
 

Detailed Description

Implementation of PI Program on CUDA Module object.

Implementation of PI Program on HIP Module object.

Definition at line 761 of file pi_cuda.hpp.

Member Typedef Documentation

◆ native_type [1/2]

using _pi_program::native_type = hipModule_t

Definition at line 729 of file pi_hip.hpp.

◆ native_type [2/2]

Definition at line 762 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ _pi_program() [1/3]

_pi_program::_pi_program ( pi_context  ctxt)

Definition at line 772 of file pi_cuda.cpp.

◆ ~_pi_program() [1/2]

_pi_program::~_pi_program ( )

Definition at line 778 of file pi_cuda.cpp.

References context_, and cuda_piContextRelease().

◆ _pi_program() [2/3]

_pi_program::_pi_program ( )
inline

Definition at line 211 of file pi_esimd_emulator.hpp.

◆ _pi_program() [3/3]

_pi_program::_pi_program ( pi_context  ctxt)

◆ ~_pi_program() [2/2]

_pi_program::~_pi_program ( )

Member Function Documentation

◆ build_program() [1/2]

pi_result _pi_program::build_program ( const char *  build_options)

◆ build_program() [2/2]

◆ decrement_reference_count() [1/2]

pi_uint32 _pi_program::decrement_reference_count ( )
inlinenoexcept

Definition at line 755 of file pi_hip.hpp.

References refCount_.

◆ decrement_reference_count() [2/2]

pi_uint32 _pi_program::decrement_reference_count ( )
inlinenoexcept

Definition at line 796 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piProgramRelease(), and hip_piProgramRelease().

◆ get() [1/2]

native_type _pi_program::get ( ) const
inlinenoexcept

Definition at line 751 of file pi_hip.hpp.

References module_.

◆ get() [2/2]

◆ get_context() [1/2]

pi_context _pi_program::get_context ( ) const
inline

Definition at line 749 of file pi_hip.hpp.

References context_.

◆ get_context() [2/2]

◆ get_reference_count() [1/2]

pi_uint32 _pi_program::get_reference_count ( ) const
inlinenoexcept

Definition at line 757 of file pi_hip.hpp.

References refCount_.

◆ get_reference_count() [2/2]

pi_uint32 _pi_program::get_reference_count ( ) const
inlinenoexcept

◆ increment_reference_count() [1/2]

pi_uint32 _pi_program::increment_reference_count ( )
inlinenoexcept

Definition at line 753 of file pi_hip.hpp.

References refCount_.

◆ increment_reference_count() [2/2]

pi_uint32 _pi_program::increment_reference_count ( )
inlinenoexcept

Definition at line 794 of file pi_cuda.hpp.

References refCount_.

Referenced by cuda_piProgramRetain(), and hip_piProgramRetain().

◆ set_binary() [1/2]

pi_result _pi_program::set_binary ( const char *  binary,
size_t  binarySizeInBytes 
)

◆ set_binary() [2/2]

pi_result _pi_program::set_binary ( const char *  binary,
size_t  binarySizeInBytes 
)

Definition at line 829 of file pi_cuda.cpp.

References binary_, and binarySizeInBytes_.

◆ set_metadata()

Member Data Documentation

◆ binary_

const char * _pi_program::binary_

◆ binarySizeInBytes_

size_t _pi_program::binarySizeInBytes_

◆ buildOptions_

std::string _pi_program::buildOptions_

◆ buildStatus_

◆ Context

pi_context _pi_program::Context

Definition at line 214 of file pi_esimd_emulator.hpp.

◆ context_

_pi_context * _pi_program::context_

◆ errorLog_

char _pi_program::errorLog_

Definition at line 776 of file pi_cuda.hpp.

Referenced by build_program().

◆ globalIDMD_

std::unordered_map<std::string, std::string> _pi_program::globalIDMD_

◆ infoLog_

char _pi_program::infoLog_

◆ kernelReqdWorkGroupSizeMD_

std::unordered_map<std::string, std::tuple<uint32_t, uint32_t, uint32_t> > _pi_program::kernelReqdWorkGroupSizeMD_

Definition at line 771 of file pi_cuda.hpp.

Referenced by set_metadata().

◆ MAX_LOG_SIZE

constexpr static size_t _pi_program::MAX_LOG_SIZE = 8192u
staticconstexpr

◆ module_

native_type _pi_program::module_

Definition at line 763 of file pi_cuda.hpp.

Referenced by build_program(), and get().

◆ refCount_

std::atomic_uint32_t _pi_program::refCount_

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