Charades
Classes | Enumerations | Functions
event.h File Reference
#include "event.decl.h"
#include "globals.h"
#include "typedefs.h"

Go to the source code of this file.

Classes

struct  RemoteEvent
 
struct  tw_event_state
 
struct  tw_bf
 tw_bf More...
 
class  Event
 
class  StandardEventComparator
 
class  CustomEventComparator
 
class  DispatcherBase< LPType >
 
class  Dispatcher< LPType, MsgType >
 

Enumerations

enum  tw_event_owner { TW_event_null = 0, TW_chare_q = 1, TW_rollback_q = 2, TW_sent = 3 }
 

Functions

 PUPbytes (tw_event_state)
 
 PUPbytes (tw_bf)
 
void pup_causality (PUP::er &p, Event *e)
 
Eventevent_alloc (RemoteEvent *event, uint64_t dest_gid, Time offset, LPBase *sender)
 Send a previously allocated event. More...
 
Eventevent_alloc ()
 
void tw_event_send (Event *event)
 Sends an event to its destination LP.
 
void tw_event_free (Event *e, bool commit)
 
void tw_event_rollback (Event *event)
 
void charm_event_cancel (Event *e)
 
void charm_anti_send (unsigned, Event *e)
 
void charm_event_release (RemoteEvent *e)
 
template<typename MsgType >
uint32_t get_msg_id ()
 
template<typename MsgType >
void register_msg_type ()
 
template<typename MsgType , typename... Args>
Eventtw_event_new (uint64_t dest_gid, Time offset, LPBase *sender, Args &&... args)
 Creates an Event with the appropriate payload type for the desired destination and offset in virtual time. More...
 
Eventtw_event_new (uint64_t dest_gid, Time offset, LPBase *sender, size_t size)
 Creates a generic Event with payload of the specified size. More...
 

Enumeration Type Documentation

◆ tw_event_owner

Enumerator
TW_event_null 

Event in unknown location.

TW_chare_q 

In the chare's pending queue.

TW_rollback_q 

In the chare's rollback queue.

TW_sent 

Event sent to someone else.

Function Documentation

◆ event_alloc()

Event* event_alloc ( RemoteEvent event,
uint64_t  dest_gid,
Time  offset,
LPBase sender 
)

Send a previously allocated event.

Parameters
eventthe event to send

◆ tw_event_new() [1/2]

template<typename MsgType , typename... Args>
Event* tw_event_new ( uint64_t  dest_gid,
Time  offset,
LPBase sender,
Args &&...  args 
)

Creates an Event with the appropriate payload type for the desired destination and offset in virtual time.

Parameters
dest_gidglobal id of the destination LP
offsetoffset (in units of virtual time) from the LPs current time
senderpointer to the sending LP
argsarguments to pass to the MsgType constructor

◆ tw_event_new() [2/2]

Event* tw_event_new ( uint64_t  dest_gid,
Time  offset,
LPBase sender,
size_t  size 
)

Creates a generic Event with payload of the specified size.

Parameters
dest_gidglobal id of the destination LP
offsetoffset (in units of virtual time) from the LPs current time
senderpointer to the sending LP
sizesize of the message payload