Changeset 1037 for XIOS/dev/branch_yushan/src/context_client.hpp
- Timestamp:
- 01/25/17 16:25:17 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_yushan/src/context_client.hpp
r1033 r1037 10 10 #include "mpi.hpp" 11 11 #include "registry.hpp" 12 #ifdef _usingEP 13 //#include "ep_declaration.hpp" 14 #endif 15 12 16 13 17 namespace xios … … 31 35 // Send event to server 32 36 void sendEvent(CEventClient& event); 33 bool sendTemporarilyBufferedEvent();34 37 void waitEvent(list<int>& ranks); 35 38 36 // Functions to set/get buffers37 bool getBuffers(const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers, bool nonBlocking = false);39 // Functions relates to set/get buffers 40 list<CBufferOut*> getBuffers(list<int>& serverlist, list<int>& sizeList); 38 41 void newBuffer(int rank); 39 42 bool checkBuffers(list<int>& ranks); … … 42 45 43 46 bool isServerLeader(void) const; 44 bool isServerNotLeader(void) const;45 47 const std::list<int>& getRanksServerLeader(void) const; 46 const std::list<int>& getRanksServerNotLeader(void) const;47 48 48 49 bool isAttachedModeEnabled() const; 49 50 bool hasTemporarilyBufferedEvent() const { return !tmpBufferedEvent.isEmpty(); };51 50 52 51 // Close and finalize context client … … 79 78 StdSize maxBufferedEvents; 80 79 81 struct {82 std::list<int> ranks, sizes;83 std::list<CBufferOut*> buffers;84 85 bool isEmpty() const { return ranks.empty(); };86 void clear() {87 ranks.clear();88 sizes.clear();89 90 for (std::list<CBufferOut*>::iterator it = buffers.begin(); it != buffers.end(); it++)91 delete *it;92 93 buffers.clear();94 };95 } tmpBufferedEvent; //! Event temporarily buffered (used only on the server)96 97 80 //! Context for server (Only used in attached mode) 98 81 CContext* parentServer; … … 100 83 //! List of server ranks for which the client is leader 101 84 std::list<int> ranksServerLeader; 102 103 //! List of server ranks for which the client is not leader104 std::list<int> ranksServerNotLeader;105 85 106 86 public: // Some function should be removed in the future
Note: See TracChangeset
for help on using the changeset viewer.