00001 // -*- C++ -*- 00002 00003 #ifndef _included_CommIOServer_h 00004 #define _included_CommIOServer_h 00005 00011 #include "DAGHParams.h" 00012 #include "DAGHIOParams.h" 00013 #include "PackedGridDataBucket.h" 00014 #include "CommServer.h" 00015 00016 class GridHierarchy; 00017 00018 #define DAGHIOServerRcvNULL ((DAGHIOServerRcv *) 0) 00019 #define DAGHIOServerSndNULL ((DAGHIOServerSnd *) 0) 00020 #define DAGHIOServerPingNULL ((DAGHIOServerPing *) 0) 00021 00022 class DAGHIOServerRcv : public comm_service 00023 { 00024 public: 00025 GridHierarchy& gh; 00026 int Size; 00027 DAGHIO_WriteFunc wf; 00028 int end_cnt; 00029 00030 DAGHIOServerRcv(const unsigned tag, GridHierarchy& gridhierarchy, 00031 DAGHIO_WriteFunc writefunc); 00032 void callrecv( const MPI_Status & ); 00033 void rcv_update( void * ); 00034 inline void Set_DAGHIOWriteFunc(DAGHIO_WriteFunc writefunc) { wf = writefunc; } 00035 const char * name(void) const; 00036 }; 00037 00038 class DAGHIOServerSnd : public comm_service 00039 { 00040 public: 00041 GridHierarchy& gh; 00042 int Size; 00043 DAGHIO_ReadFunc rf; 00044 int end_cnt; 00045 00046 DAGHIOServerSnd(const unsigned tag, GridHierarchy& gridhierarchy, 00047 DAGHIO_ReadFunc readfunc); 00048 void callrecv( const MPI_Status & ); 00049 void snd_update( void * ); 00050 inline void Set_DAGHIOReadFunc(DAGHIO_ReadFunc readfunc) { rf = readfunc; } 00051 const char * name(void) const; 00052 }; 00053 00054 class DAGHIOServerPing : public comm_service 00055 { 00056 GridHierarchy& gh; 00057 DAGHIO_PingFunc pf; 00058 int flag; 00059 int end_cnt; 00060 public: 00061 DAGHIOServerPing(const unsigned tag, GridHierarchy& gridhierarchy, 00062 DAGHIO_PingFunc pingfunc); 00063 void callrecv( const MPI_Status & ); 00064 const char * name(void) const; 00065 }; 00066 00067 #endif 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095