00001 // -*- C++ -*- 00002 00003 #ifndef _included_GridTableCommRcv_h 00004 #define _included_GridTableCommRcv_h 00005 00011 #include "DAGHParams.h" 00012 #include "CommServer.h" 00013 #include "GridTable.h" 00014 00015 //#include <iosfwd> 00016 #include <cstdlib> 00017 00018 #define GridTableGhostRcvNULL ((GridTableGhostRcv *) 0) 00019 #define GridTableDataRcvNULL ((GridTableDataRcv *) 0) 00020 00021 class GridTableGhostRcv : public comm_service 00022 { 00023 public: 00024 GridTable &Table; 00025 char *Request; 00026 const unsigned Size; 00027 short rcvflag; 00028 00029 GridTableGhostRcv(GridTable& GT, 00030 const unsigned tag, 00031 const unsigned size, 00032 const int src=MPI_ANY_SOURCE); 00033 00034 inline ~GridTableGhostRcv() 00035 { if ( Request ) delete [] Request; } 00036 00037 void rcv_update( void * ); 00038 void callrecv( const MPI_Status & ); 00039 void callrecvNpost( const MPI_Status & ); 00040 void postrcv(); 00041 int received() { return (rcvflag == DAGHTrue); } 00042 const char * name() const; 00043 }; 00044 00045 class GridTableDataRcv : public comm_service 00046 { 00047 public: 00048 GridTable &Table; 00049 char *Request; 00050 const unsigned Size; 00051 short rcvflag; 00052 00053 GridTableDataRcv(GridTable& GT, 00054 const unsigned tag, 00055 const unsigned size, 00056 const int src=MPI_ANY_SOURCE); 00057 00058 inline ~GridTableDataRcv() 00059 { if ( Request ) delete [] Request; } 00060 00061 void rcv_update( void * ); 00062 void callrecv( const MPI_Status & ); 00063 void callrecvNpost( const MPI_Status & ); 00064 void postrcv(); 00065 int received() { return (rcvflag == DAGHTrue); } 00066 const char * name() const; 00067 }; 00068 00069 // std::ostream & operator << ( std::ostream & , const MPI_Status & ); 00070 00071 #endif 00072