SAMRAI::tbox::StatTransaction Class Reference

#include <source/toolbox/timers/StatTransaction.h>

Inheritance diagram for SAMRAI::tbox::StatTransaction:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 StatTransaction (Pointer< Statistic > stat, int src_proc_id, int dst_proc_id)
virtual ~StatTransaction ()
virtual bool canEstimateIncomingMessageSize ()
virtual int computeIncomingMessageSize ()
virtual int computeOutgoingMessageSize ()
virtual int getSourceProcessor ()
virtual int getDestinationProcessor ()
virtual void packStream (AbstractStream &stream)
virtual void unpackStream (AbstractStream &stream)
virtual void copyLocalData ()
virtual void printClassData (std::ostream &stream) const

Detailed Description

A stattistic transaction represents a simple copy communication transaction between two processors for sending and gathering statistic information generated on different processors.

See also:
tbox::Schedule

tbox::Transaction


Constructor & Destructor Documentation

SAMRAI::tbox::StatTransaction::StatTransaction ( Pointer< Statistic stat,
int  src_proc_id,
int  dst_proc_id 
)

Create a transaction for communicating local statistic information. This transaction will be responsible for either: (1) packing a message stream with statistic information if this processor number is the same as the given source processor id, or (2) unpacking tatistic information from the message stream if this processor number is the same as the given destination processor. The statistic pointer passed in through the argument list must be non-null and will be used as either the source or destination statistic depending on whether case (1) or (2) applies.

Note that generally this transaction class is used to pass information between two different processors and unexpected behavior may result if the source and destination processors are the same. Also, note that the copyLocalData() routine has an empty implementation.

SAMRAI::tbox::StatTransaction::~StatTransaction (  )  [virtual]

The virtual destructor for the copy transaction releases all memory associated with the transaction.


Member Function Documentation

bool SAMRAI::tbox::StatTransaction::canEstimateIncomingMessageSize (  )  [virtual]

Return a boolean indicating whether this transaction can estimate the size of an incoming message. If this is false, then a different communications protocol kicks in and the message size is transmitted between nodes.

Implements SAMRAI::tbox::Transaction.

int SAMRAI::tbox::StatTransaction::computeIncomingMessageSize (  )  [virtual]

Return the amount of buffer space needed for the incoming message. This routine is only called if the transaction can estimate the size of the incoming message.

Implements SAMRAI::tbox::Transaction.

int SAMRAI::tbox::StatTransaction::computeOutgoingMessageSize (  )  [virtual]

Return the buffer space needed for the outgoing message.

Implements SAMRAI::tbox::Transaction.

int SAMRAI::tbox::StatTransaction::getSourceProcessor (  )  [virtual]

Return the sending processor for the communications transaction.

Implements SAMRAI::tbox::Transaction.

int SAMRAI::tbox::StatTransaction::getDestinationProcessor (  )  [virtual]

Return the receiving processor for the communications transaction.

Implements SAMRAI::tbox::Transaction.

void SAMRAI::tbox::StatTransaction::packStream ( AbstractStream stream  )  [virtual]

Pack the transaction data into the message stream.

Implements SAMRAI::tbox::Transaction.

void SAMRAI::tbox::StatTransaction::unpackStream ( AbstractStream stream  )  [virtual]

Unpack the transaction data from the message stream.

Implements SAMRAI::tbox::Transaction.

void SAMRAI::tbox::StatTransaction::copyLocalData (  )  [virtual]

Perform the local data copy for the transaction. This function drops through as it is not needed.

Implements SAMRAI::tbox::Transaction.

void SAMRAI::tbox::StatTransaction::printClassData ( std::ostream &  stream  )  const [virtual]

Print transaction information to given output stream.

Implements SAMRAI::tbox::Transaction.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:29:09 2009 for SAMRAI by  doxygen 1.5.1