SAMRAI::tbox::Schedule Class Reference

Class Schedule is used to construct and execute a set of data communication transactions. Each transaction represents some data dependency and exchange between two processors, or locally involving a single processor. Once a communication schedule is constructed, transactions are provided to the schedule, using either the addTransaction() method or the appendTransaction() method. The schedule is then executed forcing the communication, either interprocessor or local to occur. The basic idea behind the schedule is that it enables the cost of assembling communication dependencies and data transfers over many communication phases. More...

#include <source/toolbox/parallel/Schedule.h>

Inheritance diagram for SAMRAI::tbox::Schedule:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Schedule ()
virtual ~Schedule ()
void addTransaction (const Pointer< Transaction > &transaction)
void appendTransaction (const Pointer< Transaction > &transaction)
void communicate ()
void beginCommunication ()
void finalizeCommunication ()
void printClassData (std::ostream &stream) const

Classes

struct  ScheduleMessageStream

Detailed Description

Class Schedule is used to construct and execute a set of data communication transactions. Each transaction represents some data dependency and exchange between two processors, or locally involving a single processor. Once a communication schedule is constructed, transactions are provided to the schedule, using either the addTransaction() method or the appendTransaction() method. The schedule is then executed forcing the communication, either interprocessor or local to occur. The basic idea behind the schedule is that it enables the cost of assembling communication dependencies and data transfers over many communication phases.

Note that since the transactions are stored in lists, the "add" and "append" mimick the semantics of the List class. That is, addTransaction() will put the transaction at the head of the list, while appendTransaction() will put the transaction at the end of the list. This flexibility is provided for situations where the order of transaction execution matters. Regardless of which method is used to assemble the transactions, they will be executed in the order in which they appear in the list.

See also:
tbox::Transaction

tbox::List


Constructor & Destructor Documentation

SAMRAI::tbox::Schedule::Schedule (  ) 

Create an empty schedule with no transactions.

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

The destructor deletes the schedule and all associated storage. Note that the schedule should not be deleted during a communication phase.


Member Function Documentation

void SAMRAI::tbox::Schedule::addTransaction ( const Pointer< Transaction > &  transaction  ) 

Add a data transaction to the head of the list of transactions already assembled in the schedule. The transaction must involve the local processor as either a source or destination or both. If the transaction does not include the local processor, then the transaction is not placed on the schedule.

Parameters:
transaction Pointer to transaction added to the schedule.

void SAMRAI::tbox::Schedule::appendTransaction ( const Pointer< Transaction > &  transaction  ) 

Append a data transaction to the tail of the list of transactions already assembled in the schedule. The transaction must involve the local processor as either a source or destination or both. If the transaction does not include the local processor, then the transaction is not placed on the schedule.

Parameters:
transaction Pointer to transaction appended to the schedule.

void SAMRAI::tbox::Schedule::communicate (  ) 

Perform the communication described by the schedule.

void SAMRAI::tbox::Schedule::beginCommunication (  ) 

Begin the communication process but do not deliver data to the transaction objects. Member function finalizeCommunication() must be called to finish the message communication.

void SAMRAI::tbox::Schedule::finalizeCommunication (  ) 

Finish the communication and deliver the messages. This member function completes communication began by beginCommunication().

void SAMRAI::tbox::Schedule::printClassData ( std::ostream &  stream  )  const

Print class data to the specified output stream.


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