Ignore:
Timestamp:
02/17/17 19:51:36 (7 years ago)
Author:
oabramkina
Message:

dev: intermediate commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/context_client.hpp

    r1021 r1054  
    3131      // Send event to server 
    3232      void sendEvent(CEventClient& event); 
     33      bool sendTemporarilyBufferedEvent(); 
    3334      void waitEvent(list<int>& ranks); 
    3435 
    35       // Functions relates to set/get buffers 
    36       list<CBufferOut*> getBuffers(list<int>& serverlist, list<int>& sizeList); 
     36      // Functions to set/get buffers 
     37      bool getBuffers(const list<int>& serverList, const list<int>& sizeList, list<CBufferOut*>& retBuffers, bool nonBlocking = false); 
    3738      void newBuffer(int rank); 
    3839      bool checkBuffers(list<int>& ranks); 
     
    4647 
    4748      bool isAttachedModeEnabled() const; 
     49      bool hasTemporarilyBufferedEvent() const { return !tmpBufferedEvent.isEmpty(); }; 
    4850 
    4951      // Close and finalize context client 
    50       void closeContext(void); 
     52//      void closeContext(void);  Never been implemented. 
    5153      void finalize(void); 
    5254 
     
    6870      MPI_Comm intraComm; //!< Communicator of client group 
    6971 
    70       map<int,CClientBuffer*> buffers; //!< Buffers for connection to servers 
     72      map<int,CClientBuffer*> buffers;     //!< Buffers for connection to servers 
    7173 
    7274    private: 
     
    7577      //! Maximum number of events that can be buffered 
    7678      StdSize maxBufferedEvents; 
     79 
     80      struct { 
     81        std::list<int> ranks, sizes; 
     82        std::list<CBufferOut*> buffers; 
     83 
     84        bool isEmpty() const { return ranks.empty(); }; 
     85        void clear() { 
     86          ranks.clear(); 
     87          sizes.clear(); 
     88 
     89          for (std::list<CBufferOut*>::iterator it = buffers.begin(); it != buffers.end(); it++) 
     90            delete *it; 
     91 
     92          buffers.clear(); 
     93        }; 
     94      } tmpBufferedEvent; //! Event temporarily buffered (used only on the server) 
    7795 
    7896      //! Context for server (Only used in attached mode) 
Note: See TracChangeset for help on using the changeset viewer.