vt::event::AsyncEvent struct

Used to track events.

Component to track events in the system to trigger actions or other events

Base classes

template<typename T>
struct vt::runtime::component::PollableComponent<AsyncEvent>
Component class for a generic, pollable VT runtime module, CRTP'ed over the component's actual type. A pollable component will be registered with the VT scheduler to ensure it makes progress.

Public types

using EventRecordTypeType = eEventRecord
using EventManagerType = EventIDManager
using EventStateType = EventState
using EventRecordType = EventRecord
using EventRecordPtrType = std::unique_ptr<EventRecordType>
using EventHolderType = EventHolder
using EventHolderPtrType = EventHolder*
using TypedEventContainerType = std::list<EventHolderType>
using EventContIter = typename TypedEventContainerType::iterator
using EventContainerType = std::unordered_map<EventType, EventContIter>

Public static functions

static void eventFinished(EventFinishedMsg* msg)
static void checkEventFinished(EventCheckFinishedMsg* msg)

Constructors, destructors, conversion operators

AsyncEvent() defaulted
~AsyncEvent() virtual

Public functions

void initialize() override
Empty default overridden initialize method.
void finalize() override
Empty default overridden finalize method.
auto createEvent(EventRecordTypeType const& type, NodeType const& node) -> EventType
Create a new event.
auto getEvent(EventType const& event) -> EventRecordType&
Get the event record.
auto getOwningNode(EventType const& event) -> NodeType
Get the owning node for an event.
auto createMPIEvent(NodeType const& node) -> EventType
Create a new MPI event that holds a MPI_Request.
auto createNormalEvent(NodeType const& node) -> EventType
Create a regular type event.
auto createParentEvent(NodeType const& node) -> EventType
Create a parent event that can have multiple children.
auto getEventHolder(EventType const& event) -> EventHolderType&
Get the holder for an event.
auto holderExists(EventType const& event) -> bool
Check if a holder exist for an event.
auto needsPolling(EventRecordTypeType const& type) -> bool
void removeEventID(EventType const& event)
auto testEventComplete(EventType const& event) -> EventStateType
auto attachAction(EventType const& event, ActionType callable) -> EventType
void testEventsTrigger(int const& num_events = num_check_actions)
auto progress(TimeType current_time) -> int override
Progress function for incremental polling.
auto isLocalTerm() -> bool
auto name() -> std::string override
Get the name of the component.
template<typename SerializerT>
void serialize(SerializerT& s)

Function documentation

EventType vt::event::AsyncEvent::createEvent(EventRecordTypeType const& type, NodeType const& node)

Create a new event.

Parameters
type in the type of event to create
node in the node that's embedded in the event bit field
Returns a new event identifier

EventRecordType& vt::event::AsyncEvent::getEvent(EventType const& event)

Get the event record.

Parameters
event in the event identifier
Returns the event record

NodeType vt::event::AsyncEvent::getOwningNode(EventType const& event)

Get the owning node for an event.

Parameters
event in the event identifier
Returns the node that owns the event

EventType vt::event::AsyncEvent::createMPIEvent(NodeType const& node)

Create a new MPI event that holds a MPI_Request.

Parameters
node in the node on which the MPI event exists
Returns the event identifier

EventType vt::event::AsyncEvent::createNormalEvent(NodeType const& node)

Create a regular type event.

Parameters
node in the node that owns it
Returns the event identifier

EventType vt::event::AsyncEvent::createParentEvent(NodeType const& node)

Create a parent event that can have multiple children.

Parameters
node in the node that owns it
Returns the event identifier

EventHolderType& vt::event::AsyncEvent::getEventHolder(EventType const& event)

Get the holder for an event.

Parameters
event in the event identifier
Returns the holder

bool vt::event::AsyncEvent::holderExists(EventType const& event)

Check if a holder exist for an event.

Parameters
event in the event identifier
Returns if it exists

int vt::event::AsyncEvent::progress(TimeType current_time) override

Progress function for incremental polling.

Parameters
current_time in current time
Returns the number of units executed—zero if no progress was made