Main Page | Modules | Class Hierarchy | Class List | File List | Class Members

cmpicomm.h

00001 //=========================================================================
00002 //  CMPICOMM.H - part of
00003 //
00004 //                  OMNeT++/OMNEST
00005 //           Discrete System Simulation in C++
00006 //
00007 //   Written by:  Andras Varga, 2003
00008 //
00009 //=========================================================================
00010 
00011 /*--------------------------------------------------------------*
00012   Copyright (C) 2003-2005 Andras Varga
00013   Monash University, Dept. of Electrical and Computer Systems Eng.
00014   Melbourne, Australia
00015 
00016   This file is distributed WITHOUT ANY WARRANTY. See the file
00017   `license' for details on this and other legal matters.
00018 *--------------------------------------------------------------*/
00019 
00020 
00021 #include "cparsimcomm.h"
00022 
00023 #ifndef __CMPICOMM_H__
00024 #define __CMPICOMM_H__
00025 
00026 
00032 class cMPICommunications : public cParsimCommunications
00033 {
00034   protected:
00035     cCommBuffer *recycledBuffer;
00036     int numPartitions;
00037     int myRank;
00038 
00039   public:
00043     cMPICommunications();
00044 
00048     virtual ~cMPICommunications();
00049 
00055     virtual void init();
00056 
00060     virtual void shutdown();
00061 
00065     virtual int getNumPartitions();
00066 
00070     virtual int getProcId();
00071 
00075     virtual cCommBuffer *createCommBuffer();
00076 
00080     virtual void recycleCommBuffer(cCommBuffer *buffer);
00081 
00085     virtual void send(cCommBuffer *buffer, int tag, int destination);
00086 
00090     virtual void broadcast(cCommBuffer *buffer, int tag);
00091 
00096     virtual bool receiveBlocking(int filtTag, cCommBuffer *buffer, int& receivedTag, int& sourceProcId);
00097 
00103     virtual bool receiveNonblocking(int filtTag, cCommBuffer *buffer,  int& receivedTag, int& sourceProcId);
00105 };
00106 
00107 #endif
00108 
00109 

Generated on Fri Apr 1 12:25:41 2005 for OMNeT++ Parallel Simulation Support by  doxygen 1.3.9.1