FEI  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
fei::MessageHandler< T > Class Template Referenceabstract

#include <fei_CommUtils.hpp>

Inheritance diagram for fei::MessageHandler< T >:
Inheritance graph
[legend]

Public Member Functions

virtual std::vector< int > & getSendProcs ()=0
 
virtual std::vector< int > & getRecvProcs ()=0
 
virtual int getSendMessageLength (int destProc, int &messageLength)=0
 
virtual int getSendMessage (int destProc, std::vector< T > &message)=0
 
virtual int processRecvMessage (int srcProc, std::vector< T > &message)=0
 

Detailed Description

template<class T>
class fei::MessageHandler< T >

MessageHandler is an interface representing a general sparse data exchange among processors.

Scenario: An object knows which processors will be sending data to the local processor and which processors will be receiving data from the local processor. Furthermore, the object can produce outgoing data on demand, and deal with incoming data when it arrives.

Given the above conditions (embodied by an implementation of this MessageHandler interface), then the function exchange(...) can perform the inter-processor communication required to complete the data exchange.

Note: If the object knows only which processors will be sent to but not which processors will be received from, or vice-versa, then the method mirrorProcs(...) can be used to find the missing information.

Definition at line 564 of file fei_CommUtils.hpp.

Member Function Documentation

template<class T>
virtual std::vector<int>& fei::MessageHandler< T >::getSendProcs ( )
pure virtual

Get the list of processors to which messages are to be sent in a sparse data exchange.

Implemented in NodeCommMgr, snl_fei::RecordMsgHandler, snl_fei::BlkSizeMsgHandler, and snl_fei::SubdMsgHandler.

template<class T>
virtual std::vector<int>& fei::MessageHandler< T >::getRecvProcs ( )
pure virtual
Get the list of processors from which messages are to be received in

a sparse data exchange.

Implemented in NodeCommMgr, snl_fei::RecordMsgHandler, snl_fei::SubdMsgHandler, and snl_fei::BlkSizeMsgHandler.

template<class T>
virtual int fei::MessageHandler< T >::getSendMessageLength ( int  destProc,
int &  messageLength 
)
pure virtual
Get the length of a message that is to be send to the specified

destination processor.

Implemented in NodeCommMgr, snl_fei::RecordMsgHandler, snl_fei::SubdMsgHandler, and snl_fei::BlkSizeMsgHandler.

template<class T>
virtual int fei::MessageHandler< T >::getSendMessage ( int  destProc,
std::vector< T > &  message 
)
pure virtual
Prepare (pack) a message that is to be sent to the specified

destination processor.

Implemented in NodeCommMgr, snl_fei::RecordMsgHandler, snl_fei::SubdMsgHandler, and snl_fei::BlkSizeMsgHandler.

template<class T>
virtual int fei::MessageHandler< T >::processRecvMessage ( int  srcProc,
std::vector< T > &  message 
)
pure virtual
Process a message that has been received from the specified source

processor.

Implemented in NodeCommMgr, snl_fei::RecordMsgHandler, snl_fei::SubdMsgHandler, and snl_fei::BlkSizeMsgHandler.


The documentation for this class was generated from the following file: