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

PI Event mapping to CUevent. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_event:

Public Types

using native_type = CUevent
 
using native_type = hipEvent_t
 

Public Member Functions

pi_result record ()
 
pi_result wait ()
 
pi_result start ()
 
native_type get () const noexcept
 
pi_queue get_queue () const noexcept
 
CUstream get_stream () const noexcept
 
pi_uint32 get_compute_stream_token () const noexcept
 
pi_command_type get_command_type () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
bool is_recorded () const noexcept
 
bool is_started () const noexcept
 
bool is_completed () const noexcept
 
pi_int32 get_execution_status () const noexcept
 
pi_context get_context () const noexcept
 
pi_uint32 increment_reference_count ()
 
pi_uint32 decrement_reference_count ()
 
pi_uint32 get_event_id () const noexcept
 
bool backend_has_ownership () const noexcept
 
pi_uint64 get_queued_time () const
 
pi_uint64 get_start_time () const
 
pi_uint64 get_end_time () const
 
pi_result release ()
 
 ~_pi_event ()
 
 _pi_event ()
 
pi_result record ()
 
pi_result wait ()
 
pi_result start ()
 
native_type get () const noexcept
 
pi_queue get_queue () const noexcept
 
hipStream_t get_stream () const noexcept
 
pi_uint32 get_compute_stream_token () const noexcept
 
pi_command_type get_command_type () const noexcept
 
pi_uint32 get_reference_count () const noexcept
 
bool is_recorded () const noexcept
 
bool is_started () const noexcept
 
bool is_completed () const noexcept
 
pi_int32 get_execution_status () const noexcept
 
pi_context get_context () const noexcept
 
pi_uint32 increment_reference_count ()
 
pi_uint32 decrement_reference_count ()
 
pi_uint32 get_event_id () const noexcept
 
pi_uint64 get_queued_time () const
 
pi_uint64 get_start_time () const
 
pi_uint64 get_end_time () const
 
pi_result release ()
 
 ~_pi_event ()
 

Static Public Member Functions

static pi_event make_native (pi_command_type type, pi_queue queue, CUstream stream, pi_uint32 stream_token=std::numeric_limits< pi_uint32 >::max())
 
static pi_event make_with_native (pi_context context, CUevent eventNative)
 
static pi_event make_native (pi_command_type type, pi_queue queue, hipStream_t stream, pi_uint32 stream_token=std::numeric_limits< pi_uint32 >::max())
 

Public Attributes

cm_support::CmEvent * CmEventPtr = nullptr
 
cm_support::CmQueue * OwnerQueue = nullptr
 
pi_context Context = nullptr
 
bool IsDummyEvent = false
 

Detailed Description

PI Event mapping to CUevent.

PI Event mapping to hipEvent_t.

Definition at line 633 of file pi_cuda.hpp.

Member Typedef Documentation

◆ native_type [1/2]

using _pi_event::native_type = hipEvent_t

Definition at line 614 of file pi_hip.hpp.

◆ native_type [2/2]

Definition at line 635 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ ~_pi_event() [1/2]

_pi_event::~_pi_event ( )

Definition at line 638 of file pi_cuda.cpp.

References cuda_piContextRelease(), and cuda_piQueueRelease().

◆ _pi_event()

_pi_event::_pi_event ( )
inline

Definition at line 202 of file pi_esimd_emulator.hpp.

Referenced by make_native(), and make_with_native().

◆ ~_pi_event() [2/2]

_pi_event::~_pi_event ( )

Member Function Documentation

◆ backend_has_ownership()

bool _pi_event::backend_has_ownership ( ) const
inlinenoexcept

Definition at line 681 of file pi_cuda.hpp.

Referenced by release().

◆ decrement_reference_count() [1/2]

pi_uint32 _pi_event::decrement_reference_count ( )
inline

Definition at line 656 of file pi_hip.hpp.

◆ decrement_reference_count() [2/2]

pi_uint32 _pi_event::decrement_reference_count ( )
inline

Definition at line 677 of file pi_cuda.hpp.

◆ get() [1/2]

native_type _pi_event::get ( ) const
inlinenoexcept

Definition at line 622 of file pi_hip.hpp.

◆ get() [2/2]

native_type _pi_event::get ( ) const
inlinenoexcept

Definition at line 643 of file pi_cuda.hpp.

◆ get_command_type() [1/2]

pi_command_type _pi_event::get_command_type ( ) const
inlinenoexcept

Definition at line 630 of file pi_hip.hpp.

◆ get_command_type() [2/2]

pi_command_type _pi_event::get_command_type ( ) const
inlinenoexcept

Definition at line 651 of file pi_cuda.hpp.

◆ get_compute_stream_token() [1/2]

pi_uint32 _pi_event::get_compute_stream_token ( ) const
inlinenoexcept

Definition at line 628 of file pi_hip.hpp.

◆ get_compute_stream_token() [2/2]

pi_uint32 _pi_event::get_compute_stream_token ( ) const
inlinenoexcept

Definition at line 649 of file pi_cuda.hpp.

Referenced by _pi_queue::get_next_compute_stream().

◆ get_context() [1/2]

pi_context _pi_event::get_context ( ) const
inlinenoexcept

Definition at line 652 of file pi_hip.hpp.

◆ get_context() [2/2]

pi_context _pi_event::get_context ( ) const
inlinenoexcept

Definition at line 673 of file pi_cuda.hpp.

Referenced by cuda_piEventsWait(), and hip_piEventsWait().

◆ get_end_time() [1/2]

pi_uint64 _pi_event::get_end_time ( ) const

◆ get_end_time() [2/2]

pi_uint64 _pi_event::get_end_time ( ) const

◆ get_event_id() [1/2]

pi_uint32 _pi_event::get_event_id ( ) const
inlinenoexcept

Definition at line 658 of file pi_hip.hpp.

◆ get_event_id() [2/2]

pi_uint32 _pi_event::get_event_id ( ) const
inlinenoexcept

Definition at line 679 of file pi_cuda.hpp.

◆ get_execution_status() [1/2]

pi_int32 _pi_event::get_execution_status ( ) const
inlinenoexcept

◆ get_execution_status() [2/2]

pi_int32 _pi_event::get_execution_status ( ) const
inlinenoexcept

◆ get_queue() [1/2]

pi_queue _pi_event::get_queue ( ) const
inlinenoexcept

Definition at line 624 of file pi_hip.hpp.

◆ get_queue() [2/2]

pi_queue _pi_event::get_queue ( ) const
inlinenoexcept

Definition at line 645 of file pi_cuda.hpp.

◆ get_queued_time() [1/2]

pi_uint64 _pi_event::get_queued_time ( ) const

◆ get_queued_time() [2/2]

pi_uint64 _pi_event::get_queued_time ( ) const

◆ get_reference_count() [1/2]

pi_uint32 _pi_event::get_reference_count ( ) const
inlinenoexcept

Definition at line 632 of file pi_hip.hpp.

◆ get_reference_count() [2/2]

pi_uint32 _pi_event::get_reference_count ( ) const
inlinenoexcept

Definition at line 653 of file pi_cuda.hpp.

◆ get_start_time() [1/2]

pi_uint64 _pi_event::get_start_time ( ) const

◆ get_start_time() [2/2]

pi_uint64 _pi_event::get_start_time ( ) const

◆ get_stream() [1/2]

hipStream_t _pi_event::get_stream ( ) const
inlinenoexcept

Definition at line 626 of file pi_hip.hpp.

◆ get_stream() [2/2]

CUstream _pi_event::get_stream ( ) const
inlinenoexcept

Definition at line 647 of file pi_cuda.hpp.

Referenced by _pi_queue::get_next_compute_stream().

◆ increment_reference_count() [1/2]

pi_uint32 _pi_event::increment_reference_count ( )
inline

Definition at line 654 of file pi_hip.hpp.

◆ increment_reference_count() [2/2]

pi_uint32 _pi_event::increment_reference_count ( )
inline

Definition at line 675 of file pi_cuda.hpp.

◆ is_completed() [1/2]

bool _pi_event::is_completed ( ) const
noexcept

◆ is_completed() [2/2]

bool _pi_event::is_completed ( ) const
noexcept

Definition at line 663 of file pi_cuda.cpp.

Referenced by get_execution_status().

◆ is_recorded() [1/2]

bool _pi_event::is_recorded ( ) const
inlinenoexcept

Definition at line 634 of file pi_hip.hpp.

◆ is_recorded() [2/2]

bool _pi_event::is_recorded ( ) const
inlinenoexcept

Definition at line 655 of file pi_cuda.hpp.

Referenced by get_end_time(), get_execution_status(), and record().

◆ is_started() [1/2]

bool _pi_event::is_started ( ) const
inlinenoexcept

Definition at line 636 of file pi_hip.hpp.

◆ is_started() [2/2]

bool _pi_event::is_started ( ) const
inlinenoexcept

Definition at line 657 of file pi_cuda.hpp.

Referenced by get_end_time(), get_queued_time(), get_start_time(), record(), and start().

◆ make_native() [1/2]

◆ make_native() [2/2]

static pi_event _pi_event::make_native ( pi_command_type  type,
pi_queue  queue,
hipStream_t  stream,
pi_uint32  stream_token = std::numeric_limits<pi_uint32>::max() 
)
inlinestatic

Definition at line 674 of file pi_hip.hpp.

References _pi_event(), and _pi_queue::get_context().

◆ make_with_native()

static pi_event _pi_event::make_with_native ( pi_context  context,
CUevent  eventNative 
)
inlinestatic

Definition at line 703 of file pi_cuda.hpp.

References _pi_event().

Referenced by cuda_piextEventCreateWithNativeHandle().

◆ record() [1/2]

pi_result _pi_event::record ( )

◆ record() [2/2]

pi_result _pi_event::record ( )

◆ release() [1/2]

pi_result _pi_event::release ( )

◆ release() [2/2]

◆ start() [1/2]

pi_result _pi_event::start ( )

◆ start() [2/2]

pi_result _pi_event::start ( )

Definition at line 645 of file pi_cuda.cpp.

References is_started(), PI_QUEUE_FLAG_PROFILING_ENABLE, and _pi_queue::properties_.

◆ wait() [1/2]

pi_result _pi_event::wait ( )

◆ wait() [2/2]

pi_result _pi_event::wait ( )

Definition at line 733 of file pi_cuda.cpp.

Member Data Documentation

◆ CmEventPtr

cm_support::CmEvent* _pi_event::CmEventPtr = nullptr

Definition at line 204 of file pi_esimd_emulator.hpp.

Referenced by piEventGetInfo(), piEventRelease(), and piEventsWait().

◆ Context

pi_context _pi_event::Context = nullptr

Definition at line 206 of file pi_esimd_emulator.hpp.

◆ IsDummyEvent

bool _pi_event::IsDummyEvent = false

Definition at line 207 of file pi_esimd_emulator.hpp.

Referenced by piEventGetInfo(), and piEventRelease().

◆ OwnerQueue

cm_support::CmQueue* _pi_event::OwnerQueue = nullptr

Definition at line 205 of file pi_esimd_emulator.hpp.

Referenced by piEventRelease().


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